Java. Lang. numberformatexception: NULL

Source: Internet
Author: User

encoding JAVA. lang. numberformatexception: NULL, at java. lang. integer. parseint (integer. java: 415) at java. lang. integer. valueof (integer. java: 553) . at the beginning, I thought that my type conversion was incorrect. It turns out that it is not careful enough. When passing the URL value, you forget to pass the parameter or pass the error. In this case, the obtained value is null. For example, the URL is http ://...... & State = 1, the passed parameter is state = 1, this parameter must be int state = integer. parseint (request. getparameter ("state") . in this way, no error is reported, but if you forget to pass the parameter state = 1 in the address bar, JAVA. lang. numberformatexception: NULL .............

SO JAVA. lang. the numberformatexception error is not necessarily type conversion error , it may also be because the parameter cannot be obtained errors

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.