Online Java Compiler By
JavaTpoint.com
public class JavaByteIntValueExample3 { public static void main(String[] args) { Byte byte1=23; //converting the byte value to integer int val1=byte1.intValue(); Byte byte2=45; int val2=byte2.intValue(); //calling integer class methods System.out.print("Maximum number between "+val1+" and "+val2+" : "); System.out.println(Integer.max(val1,val2)); System.out.print("Minimum number between "+val1+" and "+val2+" : "); System.out.println(Integer.min(val1,val2)); } }
Output