Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Help Java N Java NullPointerException

Related Tutorials


 
 

Share on Google+Share on Google+

Java NullPointerException

Advertisement
NullPointerException is a kind of unchecked exception that occurs when an application attempts to use null in a case where an object is required.

Java NullPointerException

     

NullPointerException is a kind of unchecked exception that occurs when an application attempts to use null in a case where an object is required. It is also known as runtime time exception, which occurs while running a program. This type of exception is internal to the application and extends the java.lang.RuntimeException that is inherited from java.lang.Exception class.

NullPointerException must bethrown when an application attempts to use null in a case where an object is required. These include:

  • Calling the instance method of a null object.
  • Accessing or modifying the field of a null object.
  • Taking the length of null as if it were an array.

Read more at:

http:/www.roseindia.net/java/exceptions/exception.shtml

 

Advertisement

If you enjoyed this post then why not add us on Google+? Add us to your Circles



Liked it!  Share this Tutorial


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: November 16, 2009

Related Tutorials

Discuss: Java NullPointerException  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments:0
DMCA.com