|
Could the user have included digits 0, 1, ... 9 in the input characters? A good answer might be:Yes. They are characters just like any other. |
Main MethodLater on we will do something special to convert strings of digits into primitive numeric types. This program does not do that. Here is the program again:
The main method of class Echo starts with the line: public static void main (String[] args) throws IOException You have seen most of this line before. This part: throws IOException is necessary for programs that do input (at least for now.) It informs the compiler that main() does an input operation that might fail. When the program is running and an input operation fails, the computer system will be informed of the failure and the program will be gracefully halted.
|
QUESTION 6:Have you ever (on an old DOS or Windows system) had a program halt, but not halt gracefully? Click Here after you have answered the question |