0

question on operators

it says that if its true then it will execute.... how do we know if its true or not? And how does it check?

25th Aug 2016, 5:44 PM
Aquarius
Aquarius - avatar
4 Answers
+ 1
boolean isHuman = false; if (isHuman){ // if isHuman is true, this block will be excuted } else { /*if isHuman is false, this block will be executed; in the current context, this (else) block will be executed*/}
25th Aug 2016, 6:21 PM
Smit Shah
Smit Shah - avatar
0
thank you smit :) i get it now
25th Aug 2016, 9:37 PM
Aquarius
Aquarius - avatar
0
the if else operator will check if the condition is true then it will execute if else it wont, the process is automatic
29th Aug 2016, 3:23 PM
Hillar Otieno
Hillar Otieno - avatar
0
the condition you have in your parentheses will be evaluated and the boolean value will be the one that the compiler will act on to print your line(s) of code
30th Aug 2016, 1:38 AM
Ezekiel Oladejo
Ezekiel Oladejo - avatar