View Single Post
  #2 (permalink)  
Old 04-03-2007, 12:41 PM
goldhouse goldhouse is offline
Senior Member
 
Join Date: Mar 2007
Posts: 136
goldhouse is on a distinguished road
This may be the first exception one find in his code , Best coding practices will make this exception disappear from your code.
This exception simply say ,that used object is null
Code:
String f = null ; System.out.println("this will cause null pointer exception "+ f.length());
to avoid that always use a null checking
Code:
String f = null ; if(f!==null) System.out.println("this will cause null pointer exception "+ f.length());
Reply With Quote