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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!