While writing an algorithm or any program, there are frequently situations where we want to execute different law in different situations. Booleans help our law to do just that easy and effective. More frequently, a Boolean value is returned as a result of some kind of comparison operations.