Evaluate the truth values of the declared variables. Conditions are formed using relational or equality operators. This
Question:
Evaluate the truth values of the declared variables. Conditions are formed using relational or equality operators. This is written in Java
boolean ham = false; (spinach)
boolean cheese = true; (lasagna)
char ketchup = 'y'; (salad)
Choose True or False for each highlighted expression | Choose Yes or No | Truth value of the complex condition. Choose True or False |
Example Value = False ham && cheese && salad = 'y' | short circuit? Yes | False |
(Blank) && (Blank) && (Blank) !ham && cheese && ketchup == 'y' | (Blank) | |
(Blank) !(ham && cheese && ketchup == 'y' ) | Short circuit? (Blank) | (Blank ) |
(Blank) & (Blank) !(ham && cheese) & ketchup != 'y' | ( Blank ) | |
ketchup = 'n' (blank) & (blank) !(ham & cheese) & ketchup != 'y' | ( Blank ) | |
ketchup = 'n' (Blank) && (Blank) ham ^ cheese && ketchup != 'y' | short circuit (Blank) | (blank) |
(Blank) && (Blank) ( ham || cheese) && ketchup == 'Y' | short circuit (Blank) | (Blank) |
Ketchup == 'Y' (blank) && (blank) ham | cheese && ketchup == 'y' | short circuit (Blank) | (Blank) |
(Blank) | (Blank) ham | cheese ^ketchup = 'y' | (Blank) |
When it says (blank), that is when the value will be placed according to the column.
Thank you.
ham | cheese ^ ketchup == 'y' | | (Blank)