user-avatar
Today is Thursday
February 23, 2012

March 23, 2011

What is NullPointerException?

by admin — Categories: CertificationComments Off

NullPointerException is thrown when an application attempts to use null in a case where an object is required. NullPointerException extends RuntimeException. This exception will be thrown when one of the following conditions is met:

  1. A null object of an instance method has been called.
  2. The field of a null object has been accessed or modified.
  3. The length of null in an array has been taken.
  4. The slots of null in an array have been accessed or modified.
  5. Null is thrown as if it were a Throwable value.

Share
© 2012 SCJP 4 You All rights reserved - Wallow theme v0.46.4 by ([][]) TwoBeers - Powered by WordPress - Have fun!