Answer:
public static List<String> listUpper(List<String> list){
List<String> upperList = new ArrayList<String>();
for(String s:list){
s = s.toUpperCase();
upperList.add(s);
}
return upperList;
}
Step-by-step explanation:
Create a method named listUpper that takes list as a parameter
Inside the method, initialize a new list named upperList. Create a for-each loop that iterates through the list. Inside the loop, convert each string to uppercase, using toUpperCase method, and add it to the upperList.
When the loop is done, return the upperList