Online Java Compiler By
JavaTpoint.com
public class JavaByteFloatValueExample3 { public static void main(String[] args) { //byte1 is a primitive data type object, it can?t be used to call Byte class floatValue methods byte byte1=7; Byte byte2=Byte.MAX_VALUE;; System.out.println("1. "+byte1.floatValue()); System.out.println("2. "+byte2.floatValue()); } }
Output