How to convert the value of Integer number object to byte primitive data type in Java

1 Answer

0 votes
package javaapplication1;

public class JavaApplication1 {
 
    public static void main(String[] args) {
        
        Integer i = 31;
        byte b;
        
        b = i.byteValue();

        System.out.println(b);
    }
}
 
/*
run:

31
 
*/

 



answered Sep 6, 2016 by avibootz
...