You have heard that everything with computers comes down to binary, or yes and no answers. That is true, and you can use that in your programs using Boolean values and logic operators. Boolean variables contain, and only contain, the values true or false. To determine a true or false response, there are a number of operators called logic operators that evaluate an equation as either true or false. You can then take that value and work with it or assign it to a Boolean variable.
28. Boolean Values and Equality
Get Essential Java for AP CompSci: From Programming to Computer Science now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.