Answered step by step
Verified Expert Solution
Question
1 Approved Answer
So I have those two parts , please fix the code so it capitalizes last character of each word in a sentence. Returns the string
So I have those two parts , please fix the code so it capitalizes last character of each word in a sentence.
Returns the string that results from capitalizing the last character of every word in the input parameter sentence, which is required to have at least one *character. For example, capitalizeLastCharactersInSentence("Hello there") * would return "0 therE You can assume that the sentence is a basic * English-style sentence with a single space between words. Replace this comment with your own Javados comment public static String capitalizeLastCharactersInSentence(String sentence) // Change or remove this statement as needed Scanner scan new Scanner (sentence); String output""; while (true) if (scan.hasNext )) output" output capitalizeLastCharacter(scan.next)); // destroy scan instance scan.close); return output; System.out.println("test for Begin capitalizeLastCharactersInSentence"); ystem.out.printnouttailatharactersinsentence(, ack) System.out.println(capitalizeLastCharactersInSentence("Hello, Jack")); System.out.println ("Output has to be: ") System.out.println (capitalizeLastCharactersInSentence(") System.out.println("End of the TestsStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started