File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes How to get rid of NullPointer Exception(urgent) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "How to get rid of NullPointer Exception(urgent)" Watch "How to get rid of NullPointer Exception(urgent)" New topic
Author

How to get rid of NullPointer Exception(urgent)

Vineela Devi
Ranch Hand

Joined: Dec 20, 2003
Posts: 191
Hi,
I want to check whether a ref variable is equal to null r not.How can i do this without getting nullpointerexception?
i.e
RefType variable = null;
Here, the RefType is not String
I want to chk whether variable is eaqual to null r not.
Thanks in Advance,
Vineela
[ April 21, 2004: Message edited by: Vineela Devi Jakka ]
Jeroen Wenting
Ranch Hand

Joined: Oct 12, 2000
Posts: 5093
what about simply

???


42
Corey McGlone
Ranch Hand

Joined: Dec 20, 2001
Posts: 3271
Moving this to Java in General (Beginner)


SCJP Tipline, etc.
 
 
subject: How to get rid of NullPointer Exception(urgent)