• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to get rid of NullPointer Exception(urgent)

 
Vineela Devi
Ranch Hand
Posts: 191
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5093
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what about simply

???
 
Corey McGlone
Ranch Hand
Posts: 3271
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving this to Java in General (Beginner)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic