Write a program in which a method with the heading
public static void capitalize(String s) calls a method with the heading
public static char toUpperCase(char ch) that if ch is a lowercase
letter, the method will return the corresponding uppercase letter, if ch
is an uppercase letter, the method will return the uppercase letter, and if
ch is not a letter, the method returns the same value of
ch. Thus, for instance, toUpperCase('a') returns A and
toUpperCase('$') returns '$'. Note that the uppercase letters
have a unicode (ascii code) value that is 32 lower than the corresponding
Your main method should send the string "my country tis of thee, Sweet land of liberty, Of thee I sing" to capitalize() which using toUpperCase() capitalizes the first letter in every word. Note the beginning of a word is defined as follows: the current letter is not a blank and the previous letter is a blank. The first character in the sentence should be treated separately. There can be more than one blank separating words. Method capitalize() should print: "My Country Tis Of Thee, Sweet Land Of Liberty, Of Thee I Sing."
Note that your program should work for any sentence inputted.