You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Shapira, Yoav" <Yo...@mpi.com> on 2003/04/14 22:21:23 UTC

[OFF-TOPIC] RE: NumberFormatException

Howdy,
Please mark non-tomcat-related questions as OFF-TOPIC in the subject, if
you choose to post them to this list at all.  

>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.

Most likely because empidstr is null or "".  Print out the string before
you try to format it to see its value.

In the future, please place questions like these in a general java
forum, e.g. comp.lang.java.help group on groups.google.com, jGuru, or
somewhere else.  Thanks,

Yoav Shapira
Millennium ChemInformatics



This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged.  This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender.  Thank you.


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