Respuesta :
The correct answer is
if (isBalloon == true && isRed == false) {
print ("Balloon")
}
elif (isBalloon == true && isRed == true) {
print ("Red Balloon")
}
else {
print ("Not a balloon")
}
In this specific type of code the right thing is to use two variables and logical operator. In this sense the two conditions are true and the if-else ladder statement is used.
Answer:
if (isBalloon && isRed) {
System.out.println("Red balloon");
}
else if (isBalloon) {
System.out.println("Balloon");
}
else {
System.out.println("Not a balloon");
}
Explanation:
