GeeCON Prague 2014*
The moose likes Beginning Java and the fly likes What would cause this error??? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Bookmark "What would cause this error???" Watch "What would cause this error???" New topic
Author

What would cause this error???

jason candelora
Greenhorn

Joined: Sep 25, 2003
Posts: 16
java.lang.NullPointerException
at shapeDriver.main(shapeDriver.java:13)
Exception in thread "main"
Avi Abrami
Ranch Hand

Joined: Oct 11, 2000
Posts: 1134

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

Joined: Feb 05, 2003
Posts: 102
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?


David Crossett
-nothing important to say, but learnin' plenty-
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
What would cause this error???
This would cause it.

So would this.


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
jason candelora
Greenhorn

Joined: Sep 25, 2003
Posts: 16
Thanks a lot..it was the problem using a variable that was not instantiated..
Jason
 
GeeCON Prague 2014
 
subject: What would cause this error???