Convert byte to Byte in Java
Description
The following code shows how to convert byte to Byte.
Example
//from w w w. ja v a2s .c om
public class Main {
public static void main(String[] args) {
byte by = (byte) 'A';
Byte by2 = new Byte(by);
System.out.println(by2.byteValue());
}
}
The code above generates the following result.
Home »
Java Tutorial »
Java Data Type »
Java Tutorial »
Java Data Type »