+ 4

Pls help IDK why this ain't running may be its asking for Java. lang

https://code.sololearn.com/c9RJp42mJtxu/?ref=app

2nd Oct 2018, 4:30 PM
Preeti
Preeti - avatar
7 Respostas
+ 3
I have this already na
2nd Oct 2018, 4:43 PM
Preeti
Preeti - avatar
+ 3
why isn't it asking For entering the ans for each?
2nd Oct 2018, 5:02 PM
Preeti
Preeti - avatar
+ 3
it is giving Error again telling numberformat exception in stirng
6th Oct 2018, 2:35 AM
Preeti
Preeti - avatar
0
Add this above your class: import java.io.*;
2nd Oct 2018, 4:40 PM
JavaBobbo
JavaBobbo - avatar
0
Didnt see my bad.. this should work: https://code.sololearn.com/cOj0cpOD6NCC/#java
2nd Oct 2018, 5:00 PM
JavaBobbo
JavaBobbo - avatar
0
Late reply, sry. Im not sure what you exactly try to do but try this..: https://code.sololearn.com/cOj0cpOD6NCC/#java
3rd Oct 2018, 6:00 PM
JavaBobbo
JavaBobbo - avatar
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.."); }
6th Oct 2018, 9:40 AM
JavaBobbo
JavaBobbo - avatar