package day03;
public class OperatorEx24 {
public static void main(String[] args) {
int x = 0;
int ch = ' ';
x =15;
System.out.println(10 <x && x < 20); //true
x=6; //and가 or연산자보다 우선한다.
System.out.println(x%2==0 || x%3==0 && x%6 !=0); //true
System.out.println((x%2==0 || x%3==0) && x%6 !=0); //false
ch = '1';
System.out.printf("%b%n", '0' <= ch && ch<='9');
ch = 'a';
System.out.printf("%b%n", 'a' <= ch && ch<='z');
ch = 'A';
System.out.printf("%b%n", 'A' <= ch && ch<='Z');
ch = 'q';
System.out.printf("%b%n", 'q' <= ch || ch<='Q');
}
}
true
true
false
true
true
true
true