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;
Home 
  Java Book 
    Language Basics  

Primitive Types:
  1. The Primitive Types
  2. byte
  3. short
  4. int
  5. long
  6. float
  7. double
  8. char
  9. boolean