0

How does Boolean really works? (Java)

all I know about Boolean is used for simple flags that track true/false conditions. but how does this data type really works? can you give me at least an example? thank you in advance.

5th Jun 2018, 2:07 AM
Emil Esporas
Emil Esporas - avatar
2 Answers
+ 2
an example: int a = 5; int b = 3; boolean equal; if(b == a) { equal = true; } else { equal = false; }
5th Jun 2018, 5:08 AM
Haris
Haris - avatar