Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
Dmitri Makovetskiy
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator



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
Posts: 53747
127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!