Java Programming/Keywords/byte
Appearance
From Wikibooks, open books for an open world
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
byte
is a keyword which designates
the 8 bit signed integer primitive type.
The java.lang.Byte
class is the nominal
wrapper class when you need to store a byte
value
but an object reference is required.
Syntax:
byte
<variable-name> = <integer-value>;
For example:
Computer code
byteb=65;
or
Computer code
byteb='A';
The number 65 is the code for 'A' in ASCII.
See also: