I am trying to run the simple code below on the command line in the last few hours. Still unable to fix the error.
What is the problem. I can not find.
Here is the code:
public static void main(String[] args) {
int i;
try {
DataInputStream din = new DataInputStream(System.in);
i = Integer.parseInt(din.readLine());
}
catch(NumberFormatException || IOException exception) {
System.out.println(exception.getMessage());
}
}
source
share