Java.lang.Byte
lastmod 2026-11-10created 2014-05-262 edits
Byte is a wrapper class that wraps the Java primitive type byte (a signed 8-bit integer, -128 to 127) in an object. It provides conversion methods such as Byte.parseByte(), Byte.valueOf(), and toString(), along with the MIN_VALUE and MAX_VALUE constants, and since Java 8 toUnsignedInt() can interpret the value as unsigned. When converting a byte array to a string, Arrays.toString() returns a listing of each number, while new String(bytes, charset) returns a string decoded with the character encoding, so choose between them according to the purpose.