- #1
dellmac
- 4
- 0
Looking for some assistance with this. I've been messing with this for hours and can't seem to get it right. Some assistance would be greatly appreciated. What I have below is not correct. Material in green cannot be changed. Thanks!Print "Balloon" if isBalloon is true and isRed is false. Print "Red balloon" if isBalloon and isRed are both true. Print "Not a balloon" otherwise. End with newline.import java.util.Scanner;
public class RedBalloon {
public static void main (String [] args) {
boolean isRed = false;
boolean isBalloon = false;
if (!isBalloon || isRed) {
System.out.println("Balloon");
}
else if (!isBalloon && !isRed) {
System.out.println("Red balloon");
}
else {
System.out.println("Not a balloon");
}
return;
}
}
public class RedBalloon {
public static void main (String [] args) {
boolean isRed = false;
boolean isBalloon = false;
if (!isBalloon || isRed) {
System.out.println("Balloon");
}
else if (!isBalloon && !isRed) {
System.out.println("Red balloon");
}
else {
System.out.println("Not a balloon");
}
return;
}
}