Mega Code Archive

 
Categories / Java Book / 001 Language Basics
 

0008 byte

The smallest integer type is byte. byte is a signed 8-bit type that has a range from -128 to 127. byte type variables are useful when working with a stream of data from a network or file. Byte variables are declared by use of the byte keyword. The following declares two byte variables called b and c: byte b, c;