inData = stdin.readLine();
It asks stdin
to read in one line of data
from the keyboard.
The program reads a line of character data from the
keyboard by using the method readLine()
,
which is part of the BufferedReader object.
inData = stdin.readLine();
It gets a line of characters, and assign them to the String inData. Then the next statement
System.out.println("You entered:" + inData );
writes the string to the monitor. Here is what a run of the program looks like:
Enter the data: To learn Java, you must play with the programs! You entered:To learn Java, you must play with the programs!
When you run the program you can correct what you type using the "delete" key and "backspace" key. Only when you hit "enter" are the characters sent to your program.