java - Using boolean flag -
i not sure how change inside of if statement in code fragment below reflect false.
matches boolean method
if (toppilecard.matches(super.getcardfromhand(i))) { tempcardarray[i] = super.getcardfromhand(i); }
the easiest way include exclamation mark !
@ beginning of condition statement:
if (!toppilecard.matches(super.getcardfromhand(i))) { tempcardarray[i] = super.getcardfromhand(i); }
in java, !
can used mean false or not. example, !=
comparator means "not equal to", opposed ==
means "equal to".
Comments
Post a Comment