[JAVA] 9. 관계연산자
Feb 04, 2025
Contents
결과결과 값이 true 또는 false로 나오는 연산자.
public class CompOperator {
public static void main(String[] args) {
System.out.println((3 == 4) + " "); // false
System.out.println((3 != 4) + " "); // true
System.out.println((3 > 4) + " "); // false
System.out.println((4 > 3) + " "); // true
System.out.println((3 == 3 && 4 == 7) + " "); // false
System.out.println((3 == 3 || 4 == 7) + " "); // ture
}
}
결과

Share article