Quantcast
Channel: Processing Forum
Viewing all articles
Browse latest Browse all 1768

Re : Null pointer exception

$
0
0
You don't necessarily need a constructor. You can always call the default constructor, which has no parameters, like
Score score = new Score();
If you just write 
Score score;
and want access variables of this object you will get a nullpointerException.
I wonder how and why you managed to write so much code, apparently without knowing much about
Object Oriented Programming. 
Look into that topic, if you want to know about Classes, Objects, Constructors, Fieldvariables and so forth

Viewing all articles
Browse latest Browse all 1768

Trending Articles