This content has been marked as final. Show 3 replies
The standard beginner error. You assigned the parameters in the constructor to local variables inside the constructor. This has no effect on the instance variables of the class, which happen to have the same name.
So don't redeclare the class's instance variables inside the constructor. Just assign the values there.
rellimnitsua wrote:Take away the types, should be number = number_;
public Card(int number_, int value_, String numberstring_, String suit_, boolean player_, boolean dealer_, boolean indeck_)
int number = number_;
int value = value_;
String numberstring = numberstring_;
String suit = suit_;
boolean player = player_;
boolean dealer = dealer_;
boolean indeck = indeck_;