Common Java Errors

Source: Internet
Author: User

1.NullPointerExceptin NULL pointer exception

A. References are used without initialization

B. The reference is empty and is still in use

2.IndexOutofBoundsException Subscript out of bounds

A. The array subscript is less than 0 or greater than the array. lenth

B. Using an array, when arrarylist the collection, note that JPanel will also be out of bounds, because when the layout is set to the grid column number is fixed, when adding too many controls will be out of bounds

3.NumberFormatException Numeric anomalies

A. Except for 0 operations

B. Errors in numeric operations, such as Integer.paseint ("abc"), and converting the string ABC to an integer.

4.IllegalArgumentException pass-through parameter error.

A. Correct parameters not required for incoming functions

  

  

Common Java Errors

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.