본문 바로가기
(Pre-class)

Relational Operator?

by coramdeo643 2025. 3. 29.

1. Return a boolean results, True or False

// see the relational operator as a key point

> < >= <= == !=
x > a; x < a; x >= a; x <= a; x == a; x != a;
int a = 10;
int b = 30;
boolean c = a > b; 
System.out.println(c); // false
boolean d = 9 > 8; 
System.out.println(d); // true
System.out.println(a < b); // true
System.out.println(a >= b); // false
System.out.println(a == b); // false
System.out.println(a != b); // true

'(Pre-class)' 카테고리의 다른 글

import java.util.Scanner?  (0) 2025.03.30
Logical operator?  (0) 2025.03.30
Compound Assignment Operator?  (0) 2025.03.29
Increment and Decrement Operator?  (0) 2025.03.29
Operator?  (0) 2025.03.27