Dear Friends,
I am facing problem during calculation in my awt calculator. It is showing NumberFormatException. Can your please help me to fix it. Below is part of code.
if(e.getSource()==b14)//On button 14, label is "/"
{
String v1=tf.getText().toString();
num1=num1+Integer.parseInt(v1);//num1 is as integer variable
tf.setText(""); //tf means textField
}else
if(e.getSource()==b25)
{
String v2=tf.getText().toString();
num2=num2+Integer.parseInt(v2);
result=num1/num2;
tf.setText(String.valueOf(result));
}