例:
String[] str = new String[]{'1','2'};
(long[])ConvertUtils.convert(str, long.class);
import org.apache.commons.beanutils.ConvertUtils;
术语apache commons下的beanutils.jar中
本文介绍如何使用Apache Commons BeanUtils库中的ConvertUtils方法将String数组转换为long类型数组。示例代码展示了具体的转换过程。
例:
String[] str = new String[]{'1','2'};
(long[])ConvertUtils.convert(str, long.class);
import org.apache.commons.beanutils.ConvertUtils;
术语apache commons下的beanutils.jar中
2277

被折叠的 条评论
为什么被折叠?