The byte Java Keyword defines the 8-bit integer primitive type.
The keyword byte in Java is a primitive type that designates with eight bit signed integer
in java primitive type. In java keyword byte will be stored as an integer value
between the range −128 to 127.
The class ( java.lang.Byte) will be required
as nominal wrapper class in that we need to store the byte value but the object reference is
needed.
The byte class that is a wrapper class for byte primitive type and that
also defines min and max values represent range of values for this type.
Syntact: Syntact of byte Keyword
| byte <variable-name> = <integer-value>; |
Here is an example:
|
public class Main { public static void main(String[] args) { byte sun= -12; |
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.
Ask Questions? Discuss: The byte Keyword
Post your Comment