Skip to content

Instantly share code, notes, and snippets.

@RaynZayd
Created July 26, 2017 11:20
Show Gist options
  • Save RaynZayd/4e76608313dd030f5b134d16c5257816 to your computer and use it in GitHub Desktop.
Save RaynZayd/4e76608313dd030f5b134d16c5257816 to your computer and use it in GitHub Desktop.
/**This program demonstrates the use of Equality, Relational and Operators. It check if two integer value are equal, not equal, greater than, less than, great or equal to and less that or equal to then prints to the screen if true or false. By Rayn Zayd **/
public class CompareTest{
public static void main(String[] args){
int x = 10;
int y = 5;
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);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment