불리언 타입 boolean 참과 거짓을 표현하는 타입
class BooleanExample1 {
public static void main(String args[]) {
int num = 10 + 20;
boolean truth; // boolean 타입의 변수를 선언
truth = num > 10; // boolean 타입의 변수에 조건식의 결과 대입
if (truth) // boolean 타입의 변수를 사용
System.out.println("계산 결과가 10보다 큽니다.");
}
}
class BooleanExample1 {