Question: write a code that satisfies the below conditions: 1) It returns a string by changing the case of characters in the given string. It must
write a code that satisfies the below conditions:
1) It returns a string by changing the case of characters in the given string. It must pass the random test cases.
2) The first character in this must be in uppercase, the second one in lowercase, 4th one in uppercase, 5th one in lowercase, and so on.( for example the string "abcd" will be returned as " AbCd").
3) use the method/methods 'Character.toLowercase(int)' and Character.toUppercase(int).
package...
public static String Mysteing( String str){
return "";
}
}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
