Please use Java/** * Returns a new string version of the current string where the capitalization is reversed (i.e., lowercase to uppercase, and uppercase to lowercase) for the alphabetical characters...


Please use Java/**
* Returns a new string version of the current string where the capitalization is reversed (i.e., lowercase to uppercase, and uppercase to lowercase) for the alphabetical characters specified in the given arg.
*
* All non-alphabetical characters are unaffected.
* If the current string is null, empty, or has not been set to a value, this method should return an empty string.
*
* Example(s):
* - For a current string "abc, XYZ; 123.", calling reverse("bcdxyz@3210.") would return "aBC, xyz; 123."
* - For a current string "abc, XYZ; 123.", calling reverse("6,.") would return "abc, XYZ; 123."
* - For a current string "abc, XYZ; 123.", calling reverse("") would return "abc, XYZ; 123."
* - For a current string "", calling reverse("") would return ""
*
* Remember: This method builds and returns a new string, and does not directly modify the myString field.
*
* @param arg the string containing the alphabetical characters to have their capitalization reversed in the current string
* @return new string in which the alphabetical characters specified in the arg are reversed
*/
public String reverse(String arg) {





Jun 09, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here