You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Srinivasu Gandu <SG...@SoftwareSpecialists.com> on 2003/04/14 22:14:50 UTC

NumberFormatException

When I try to convert a string into int why do I get this exception...
java.lang.NumberFormatException: null 
My class contains 
import java.util.*
I tried    int empid = Integer.parseInt(empidstr); and int empid =
Integer.valueOf(empidstr).intvalue(); In both ways I am getting this error.

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: NumberFormatException

Posted by Anthony Swan <an...@crazytonys.com>.
You're getting that error because empidstr is null.


Tony

Srinivasu Gandu wrote:

> When I try to convert a string into int why do I get this exception...
> java.lang.NumberFormatException: null
> My class contains
> import java.util.*
> I tried    int empid = Integer.parseInt(empidstr); and int empid =
> Integer.valueOf(empidstr).intvalue(); In both ways I am getting this error.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org