This week's giveaway is in the Spring forum.
We're giving away four copies of Learn Spring Security (video course) and have Eugen Paraschiv on-line!
See this thread for details.
Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
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: 48363
56
  • 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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic