Team Lesson
This is our team's lesson.
int time = 20; //set variable
if (time < 18) { //the program decides whether this is true or not
System.out.println("Good day."); //if it is then print this line
} else {
System.out.println("Good evening."); //if it is not then print this
}
boolean blue = true;
boolean red = true;
if (!(blue && red)){
System.out.println("I do not like blue or red");
}
else{
System.out.println("My favorite colors are blue and red");
}
int x = 1; // the integer given in the variable is 20
String output;
switch (x) {
case 1:
output = x + " > 0";
break;
case 2:
output = x + " > 2";
break;
case 3:
output = x + " > 3";
break;
case 4:
output = x + " > 4";
break;
}
System.out.println(output)