The byte primitive

suggest change

A byte is a 8-bit signed integer. It can store a minimum value of -27 (-128), and a maximum value of 27 - 1 (127)

byte example = -36;
byte myByte = 96;
byte anotherByte = 7;

byte addedBytes = (byte) (myByte + anotherByte); // 103
byte subtractedBytes = (byte) (myBytes - anotherByte); // 89

The maximum and minimum values of byte can be found at:

byte high = Byte.MAX_VALUE;        // high == 127
byte low = Byte.MIN_VALUE;         // low == -128

The default value of a byte is 0

byte defaultByte;    // defaultByte == 0

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:


Primitive Data Types:
* The byte primitive

Table Of Contents
8 Arrays
10 Maps
11 Strings
25 JAXB
26 Primitive Data Types
29 Enums
32 Audio
41 Scanner
63 Logging
75 Lists
78 Sets
89 JAX-WS
96 XJC
98 Process
106 Modules
114 Applets
122 JNDI
139 JavaBean
141 Literals
144 Packages
150 JMX
153 JShell
159 Sockets
167 Enum Map
175 Hashtable
177 SortedMap