What is the range of datatype byte in the java?
Answers
Answered by
0
Answer:
Range means the maximum and minimum value that can be stored inside the variable of a given type. For example if you have unsigned char and if we assume that the size of the datatype is 8 bits then you can store values ranging from 0 - 2^8-1 i.e. 0-255 inside it.
Answered by
0
Answer:
Primitive Data Types
Data Type Size Description
byte 1
byte Stores whole numbers from -128 to 127
short
2 bytes Stores whole numbers from -32,768 to 32,767
int
4 bytes Stores whole numbers from -2,147,483,648 to 2,147,483,647
long
8 bytes Stores whole numbers from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807
Similar questions