Do you think that pressing the "enter" key can be un-done by pressing the "delete" key?
No. Pressing "enter" signals that the user has an acceptable line of characters.
Here is another run of the program:
Enter the data: Columbus sailed in 1492. You entered:Columbus sailed in 1492.
Notice that the characters '1', '4', '9', and '2' were read in and written out just as were the other characters. Now consider yet another run:
Enter the data: 1492 You entered:1492
Nothing special here. The '1', '4', '9', and '2' are still characters. If you want the user to enter numeric data, your program must convert from character data to a numeric type. The characters are first read into a String object. Then the String object is converted into a numeric type. This is done using a wrapper class.