Write a Class named FinalExamAnswers.java In the class, create a public static method named manipulate String that asks

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Write a Class named FinalExamAnswers.java In the class, create a public static method named manipulate String that asks

Post by answerhappygod »

Write A Class Named Finalexamanswers Java In The Class Create A Public Static Method Named Manipulate String That Asks 1
Write A Class Named Finalexamanswers Java In The Class Create A Public Static Method Named Manipulate String That Asks 1 (80.24 KiB) Viewed 42 times
Write a Class named FinalExamAnswers.java In the class, create a public static method named manipulate String 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 Run 2: Enter a sentence: User enters: "an apple a day keeps the doctor away" Method prints: "away DOCTOR the KEEPS day A apple AN" 359186.2507872x3qy LAB ACTIVITY 22.2.1: Question 2 0/6 Downloadable files FinalExamAnswers.java Download FinalExamAnswers.java Load default template.... 1 public class FinalExamAnswers { 2 3 public static void main(String [] args) { 4 manipulateString(); 5 } 6 7 //your code here 8 9 10 }
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply