String[] strTrimArray = {"tom ","jack"} ;
List<String> collect = Arrays.asList(strTrimArray).stream().map(String::trim).collect(Collectors.toList());
collect.forEach(System.out::println);
String[] strTrimArray = {"tom ","jack"} ;
List<String> collect = Arrays.asList(strTrimArray).stream().map(String::trim).collect(Collectors.toList());
collect.forEach(System.out::println);