Question: Java Programming question-strings write a program using Scanner and its nextLine method. The following is an example of how to use nextLine Scanner kybd new

 Java Programming question-strings write a program using Scanner and its nextLine

Java Programming question-strings write a program using Scanner and its nextLine method. The following is an example of how to use nextLine Scanner kybd new Scanner(System.in. System out println("Enter a line of text), String aLine kybd nextLine0. You may assume that the user input has at least 7characters. Print either "the original String has no leading or trailing whitespace" or The original String has leading or trailing whitespace." Swap the first three and last four characters of aLine and print the result. Print aline in all upper case. Print the compare results of comparing aLine in all lower case with the original al ine, (his will be a number Print whether the first half of aLine is the same as the last half of aLine except for case. Note: treat each of these steps as an independent action operating on the original input So if the original input was kilroy was here, but not godot swapping the first three and last four characters would print odotroy was here, but not gkil and printlng aline in all upper case would result in KILROY WAS HERE, BUT NOT GODOT

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!