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 NullPointerException : Accessing or modifying the field of a null object? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "NullPointerException : Accessing or modifying the field of a null object?" Watch "NullPointerException : Accessing or modifying the field of a null object?" New topic
Author

NullPointerException : Accessing or modifying the field of a null object?

Dmitri Makovetskiy
Ranch Hand

Joined: Jun 21, 2010
Posts: 128



i have this method in my class. it checks whether the chess pieces move is valid and brings a boolean answer back.
yes or no.
now. the method calling works fine. what worries me that when i try to substitute the value (an object ) for a null.
does this generate that exception?


Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 40052
    
  28
Not quite sure I understand the question. Nor do I understand the code, which appears incomplete: please read this.

Have you tried a null reference to see what happens?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: NullPointerException : Accessing or modifying the field of a null object?