Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Gene Taylor   on Sep 22 In Java Category.

  
Question Answered By: Erma Henry   on Sep 22

A null pointer is just that. It means a class reference is
has a null value meaning it point to nothing eg

import java.util.Date;
....
Date a;
a.toString(); // should generate null pointer

There is no way to get 'around' a null pointer. If you have
done any C/C++ programming you will appreciate the
exception because in C/C++ and other 'lower' languages your
program just shoots itself in the foot.

Share: