0

How do Booleans work?

Like how can I incorporate a boolean into my source code?

1st Jul 2016, 5:12 PM
Chomba Chinambu
Chomba Chinambu - avatar
5 ответов
+ 3
either true or false. declare variable and set as either true or false. bool onTime; onTime = true;
2nd Jul 2016, 4:58 AM
Dwayne Barsotta
Dwayne Barsotta - avatar
+ 3
boolean have only two values either true or false...u can try by using operators int a=34; int b=16; boolean k=(a>15 && b <40); System.out.println(k); This prints true.. hope this helps
2nd Jul 2016, 5:41 PM
Gowtham Parimi
Gowtham Parimi - avatar
0
can i declare a boolean variable with the T or F value (this letters equivalent to True or False)?
5th Jul 2016, 5:09 PM
Federico Rodriguez Hormaechea
Federico Rodriguez Hormaechea - avatar
0
a boolean is 0 or 1. It's like a licht switch on and off.
21st Jul 2016, 9:16 PM
Ricardo van der werf
Ricardo van der werf - avatar
0
boolean return positive or negative values which is compiled by Java and it will return true if positive else false negative..
14th Aug 2016, 8:17 AM
Ashish Kumar
Ashish Kumar - avatar