/* Logical Operators /
"||" - OR
"&&" - AND
"!" - NOT
*/
public class F020_LogicalOperators {
public static void main(String[] args) {
int temperature = 22;
boolean isWarm = temperature > 20 && temperature < 30;
System.out.println(isWarm);
// temperature 12
temperature = 12;
isWarm = temperature > 20 && temperature < 30;
System.out.println(isWarm);
boolean hasHighIncome = true;
boolean hasGoodCredit = true;
boolean hasCriminalRecord = false;
boolean isEligible = ((hasHighIncome || hasGoodCredit) && !hasCriminalRecord);
// "||" - OR
// "&&" - AND
System.out.println(isEligible);
}
}