Online Java Compiler By
JavaTpoint.com
public class JavaByteEqualsExample3 { public static void main(String[] args) { //09 is considered as integer number Byte b1= 00; byte b2=09; boolean val=b1.equals(b2); if(val){ System.out.println(b1+" and "+b2+" are equal"); } else{ System.out.println(b2+" is greater than "+b1); } } }
Output