List<String> names = Arrays.asList("aa", "bb", "cc", "dd");
List<String> uppercaseNames = new ArrayList<>();
for (String name : names) {
uppercaseNames.add(name.toUpperCase());
}
List<String> nameLst = names.stream().map(String::toUpperCase).collect(Collectors.toList());
System.out.println(nameLst);