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

python - jinja2: TemplateSyntaxError: expected token ',', got 'string' -

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

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