Been having this problem for a couple of days now, cant seem to figure it out. The error from what i can find over the internet has somethin to do with how the constructor is used.
example
//constructor
public Board(Color top,Color bottom,Color middle){
topRowColor = top;
bottomRowColor = bottom;
middleRowColor = middle;
}
but to me this seems fine, i am very novice java programmer created a few games and calculators nothing special. TopROwColor....... have already been declared by class Color and are also private
meaning
private Color topRowCOlor.............
just dont understand why this would give me an error, unless it has nothing to do witht the constructor which is what i am starting to think.
If that is the case when else would you get the nullpointerexception error?
thanks again for any help
example
//constructor
public Board(Color top,Color bottom,Color middle){
topRowColor = top;
bottomRowColor = bottom;
middleRowColor = middle;
}
but to me this seems fine, i am very novice java programmer created a few games and calculators nothing special. TopROwColor....... have already been declared by class Color and are also private
meaning
private Color topRowCOlor.............
just dont understand why this would give me an error, unless it has nothing to do witht the constructor which is what i am starting to think.
If that is the case when else would you get the nullpointerexception error?
thanks again for any help