Relational Operator

Lesson Progress
0% Complete

Example Code

public class Relational_operators {
	public static void main(String[] args) {
		// Relational operators < > + <=
		int x = 100;
		int y = 50;
		System.out.println(x > y); // > greater than
		System.out.println(x < y); // < less than
		System.out.println(x >= y); // >= greater than Equals to
		System.out.println(x <= y); // <= less than Equals to
		System.out.println(x == y); // == Equals to
	}
}