java8的list<String>转list<Long>

String转Long

List=stringList.stream().map(Long::valueOf).collect(Collectors.toList());

Long转String

List<>=longList.stream().map(String::valueOf).collect(Collectors.toList());

你可能感兴趣的:(java永无止境)