public class Program {
static
boolean isValid(String color, int size) {
// Return boolean based on three expressions.
return color.length() >= 1 && size >= 10 && size <= 100;
}
public static void main(String[] args) {
// This call returns true.
if (
isValid("blue", 50)) {
System.out.println(
"A");
}
// This call is not valid because the size is too large.
if (!
isValid("orange", 200)) {
System.out.println(
"B");
}
}
}
A
B