I am new to java programming . I was practicing some code about string. I wrote a code:
public class NewClass {
public static void main(String[] args) {
int m ;
String s ;
m = Integer.parseInt(ss);
System.out.println(ss);
}
}
But that gives me some error:
Exception in thread "main" java.lang.NumberFormatException: null
at java.lang.Integer.parseInt(Integer.java:542)
at java.lang.Integer.parseInt(Integer.java:615)
at javastackoverflow.NewClass.main(NewClass.java:13)
C:\Users\Hp\AppData\Local\NetBeans\Cache\8.2\executor-snippets\run.xml:53: Java returned: 1
BUILD FAILED (total time: 0 seconds)
What is the problem in my code and why am I getting this error?
Can anyone help me out?