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