Use of boolean in if block

i don’t understand the use of boolean in the if block of this program

Which program?
Please post ur code as well