String数组转long数组

 
//截取字符串
String[] propertyIdListString = jdzPortArgumentsVO.getPropertyIdList().split(",");
//string 转为  long
List<Long> propertyIdList = Arrays.stream(propertyIdListString)
        .map(s -> Long.parseLong(s.trim())).collect(Collectors.toList());
 

 

猜你喜欢

转载自www.cnblogs.com/wangshuang123/p/12505317.html