Question: Develop body of the Java method String changeCase(String str), that takes a String, str, as an argument, and returns a new String with the same
Develop body of the Java method String changeCase(String str), that takes a String, str, as an argument, and returns a new String with the same content by changing the cases of all letters of the str,(change lowercase letters to uppercase letters , and uppercase letters to lowercase letters).
For example, if str = "Is this CPSC1150?", then the method should return "iS THIS cpsc1150?".
Notes:
1.You arenot allowedto use regular expression to solve the problem
public static String changeCase(String str){
}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
