Mega Code Archive

 
Categories / Java Tutorial / Data Type
 

Use Byte constructor to convert byte primitive type to Byte object

public class Main {   public static void main(String[] args) {     byte i = 10;          Byte bObj = new Byte(i);     System.out.println(bObj);   } }