May you help me with this please?
Create a Class named FinalExamAnswers.java In the class, make a public static method named manipulateString that asks the user for a sentence using the Scanner.
Use the String class's split method to split the text into an array of Strings using " " (space) as the delimiter. Print the words of the sentence in reverse order. The words at odd indexes prior to the reversal should have all their characters converted to lowercase. The words at even indexes prior to the reversal should have all their characters converted to uppercase.
Example Run1:
Enter a sentence:
User enters: "Now is the time for all good programmers to come to the aid of their country!"
Method prints: "country! THEIR of AID the TO come TO programmers GOOD all FOR time THE is NOW"
Example Run2:
Enter a sentence:
User enters: "an apple a day keeps the doctor away"
Method prints: "away DOCTOR the KEEPS day A apple AN"
Use this code:
public class FinalExamAnswers {
public static void main(String [] args){
manipulateString();
}
//your code here
}
sectetur adipiscing elit. Nam lacinia pulvinar tortor
sectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellen
sectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellentesque dapibus efficitur laoreet. Nam risus ante, dapibus a molestie consequat, ultrices ac magna. Fusce dui lectUnlock access to this and over
10,000 step-by-step explanations
Have an account? Log In
sectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellentesque dapibus efficitur laoreet. Nam risus ante, dapibus a molestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellentesque dapibus efficitur laoreet. Nam risus ante, dapibus a molestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellentesque dapibus efficitur laoreet. Nam risus ante, dapibus a molestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam lacinia pu