Answered step by step
Verified Expert Solution
Question
1 Approved Answer
need some help , in java on intellij. thanks File Echo.java hads a line of input and echoes it back to the screen (see the
need some help , in java on intellij. thanks
File Echo.java hads a line of input and echoes it back to the screen (see the code below). public class Echo \{ public static void main(String[] args) \{ Scanner scan = new Scanner(System,in); String message; System.out. println("Enter a line of text:"); message = scan. nextline() System.out.println("You entered " + message); Systeo.out.println("Enter a line of text:"); message = scan. nextline( ); System,out,println( You entered - + message); 3 Copy the code in the main method to the placeholder and run it to see how it works. A simple run of the code should produce output similar to (user input is shown higlighted): Enter a line of text 1 first You entered first Now modify the program so that it prompts for, and reads, two separate lines of input and outputs the contents of the lines in reverse order, on the samie line, separated by a comma. Here is how your modified program should behave (user input is shown higlighted): Enter a line of text: finst Enter another 1ine of text 1 second You entered second, first Step 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