mercredi 31 mai 2017

Java - How to check if a mathematical argument is true

Today I am trying to find out how to see if a mathematical argument is true...

For Example:

if 1+1 is true do this, if false, do this...

Code Example (that I tried):

if (1+1 : true) {
     \\Some code in here if it is true
} else {
     \\Code in a Crash screen here if it is false
}

As this is only an example, the 1+1 would not be in the actual program itself...

I have looked all across StackOverflow, and all across Google, and a bunch of other places to find this, and I could not, if yall could help me, that would be great... Thanks!

Aucun commentaire:

Enregistrer un commentaire