+ 1
Can you find error
can you find error from this program .. https://code.sololearn.com/cD3p0uIPFmMq/?ref=app
4 Antworten
+ 7
Change:
int a;
to:
int a = 0;
and:
a=Integer.parseInt(in.readLine());
to:
try{
a=Integer.parseInt(in.readLine());
}
catch(IOException e){
// Error with readLine()
}
catch(NumberFormatException e){
// Wrong type of input
}
PS:
DataInputStream might not work on codeplayground.
+ 5
DataInputStream doesn't work on code playground. Try something else like BufferedReader or Scanner.
+ 2
Can you help me to correct on playground.. pls
+ 1
I got same error in eclipse 🤔..