Text is not initialized , So it gives a NumberFormatException.
Here Integer.parseInt() method will give the NumberFormatException if the passed string does not contain a parsable integer.
Use
String Text = "0"
to solve the problem
2
solved Using Integer.parseInt crashes my program