본문 바로가기

[JAVA]

[JAVA]9월 8일 복합 대입 연산자, 관계 연산자

 

*복합 대입 연산자.

 

 

*관계 연산자.

 

 

관계 연산자 예제.

public class Test {
 public static void main(String[] args){

  int x = 3;
  int y = 4;
  System.out.println( x == y);
  System.out.println( x != y);
  System.out.println( x > y);
  System.out.println( x < y);
  System.out.println( x >= y);
  System.out.println( x <= y);

}

}

실행결과는

false
true
false
true
false
true