+ 4
Pls help IDK why this ain't running may be its asking for Java. lang
7 Réponses
+ 3
I have this already na
+ 3
why isn't it asking For entering the ans for each?
+ 3
it is giving Error again telling numberformat exception in stirng
0
Add this above your class:
import java.io.*;
0
Didnt see my bad.. this should work:
https://code.sololearn.com/cOj0cpOD6NCC/#java
0
Late reply, sry.
Im not sure what you exactly try to do but try this..:
https://code.sololearn.com/cOj0cpOD6NCC/#java
0
Yes it is the try-catch block as catch the error
i use (ex) which tells you the error:
} catch (NumberFormatException ex) {
System.out.println("*ERROR* Reason: " + ex);
}
If you dont want the output to tell you the error change the text to whatever you want like:
} catch (NumberFormatException ex) {
System.out.println("Something went wrong..");
}