Package java.lang
Class Byte

Public Constructor Byte

Byte(byte value)

Byte(String s)

Throws:

_INSERT_METHOD_SIGNATURE_HERE_

Description:

constructor Byte(byte value):

This constructs a newly allocated Byte object that represents the specified byte value.

constructor Byte(String s):

This constructs a newly allocated Byte object that represents the byte value indicated by the String parameter.

Note that number literals are integers, so "byte" - literals have to be cast to byte, as shown in the example below.

Example

byte[] bytes = {(byte)0xE2, (byte)0x88, (byte)0x80}; // cast literals to byte