This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android 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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to get rid of NullPointer Exception(urgent)
 
Similar Threads
increment!
about how an instance is created
Exceptions
string pool literals are not garbase collected ??
Static and abstract