File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to test for null?

 
Anu satya
Ranch Hand
Posts: 146
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have got a doubt about null pointing object / instance test.

In general practice, how do a good programmer test for null values?

is it like :


OR is there any other method to test for null in java? like JUnit or "Sahi" kind of testing tool?

Please help me
 
Christophe Verré
Sheriff
Pie
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's very close from what you have written.

"a" and "null" can be on either side of the operator.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic