Question: write a code that satisfies the below conditions: 1) It returns a string by changing the case of characters in the given string. 2) The

write a code that satisfies the below conditions:

1) It returns a string by changing the case of characters in the given string.

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).

Code:

package...

public static String Mysteing( String str){

return "";

}

}

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 Databases Questions!