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

Popular posts from this blog

Qt4: how to send QString inside a struct via QSharedMemory -

node.js - NodeJS remote terminal to Dropbear OpenWRT-Server -

node.js - On Gitbash - Bower : ENOGIT git is not installed or not in the PATH -