Codemoji

Your code ยท JAVA

Java runs on a computer with a JDK - the steps are the check.

Type int two = 2;

Notes

Java can't compile in the browser - read the steps and type the code into the editor. Run it on your own machine when you're ready (any IDE with a JDK works).

Reference

int two = 2;
if(two == 1){
System.out.println("Two = 1");
} else if(two == 2){
System.out.println("Two = 2");
} else {
System.out.println("Two != 1 or 2");
}