Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What would cause this error???

 
jason candelora
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
java.lang.NullPointerException
at shapeDriver.main(shapeDriver.java:13)
Exception in thread "main"
 
Avi Abrami
Ranch Hand
Posts: 1141
1
Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jason,
You have a null pointer at line 13 in file "shapeDriver.java" (or is this a 'trick' question :-)
Perhaps if you posted (at least) line 13 of file "shapeDriver.java", I may be able to offer more.
Good Luck,
Avi.
 
David Crossett
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Without any code, the best guess would be that you are using a variable or class instance without instantiating it. That's usually what causes my 'nullpointer exception' errors....how bout some more code?
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What would cause this error???
This would cause it.

So would this.
 
jason candelora
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot..it was the problem using a variable that was not instantiated..
Jason
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic