| Course Teaching | You are Offering Professional Course | Locality Gandhipuram |
Variables are nothing but reserved memory locations to store values. This means that when you create a variable you reserve some space in the memory.
Based on the data type of a variable, the operating system allocates memory and decides what can be stored in the reserved memory. Therefore, by assigning different data types to variables, you can store integers, decimals, or characters in these variables.
There are two data types available in Java
Primitive Data Types
Reference/Object Data Types
Primitive Data Types
There are eight primitive datatypes supported by Java. Primitive datatypes are predefined by the language and named by a keyword. Let us now look into the eight primitive data types in detail.
byte
Byte data type is an 8-bit signed two's complement integer
Minimum value is -128 (-2^7)
Maximum value is 127 (inclusive)(2^7 -1)
Default value is 0
Byte data type is used to save space in large arrays, mainly in place of integers, since a byte is four times smaller than an integer.
Example: byte a = 100, byte b = -50
Step once At Fu-VISION for Faster growth, Better salary and make your career Bright!
PLS CONTACTFOR MORE DETAILS CALL IMMEDIATE: 9360029290 / 9003206648
Fu-VISION TRANING SOLUTION PVT LTD
COIMBATORE: HEAD OFFICE
NO: 96-A SREE NAGAR,
PALANI AANDAVAR ILLAM, 1nd FLOOR
OPP KRISHNA SWEETS,
AVINASHI ROAD, PEELAMEDU,
HOPES COLLEGE BUS STOP ,
COIMBATORE-641004
COIMBATORE: BRANCH
2nd FLOOR, SAI TOWERS,
DIAGONALLY OPP TO GANGA-YAMUNA-KAVERI THEATRE
ABOVE BAJAJ MOTORCYCLES,
GP (100FT ROAD)
COIMBATORE-641012
MAIL ID: [email protected]
Website:www.fu-vision.com / www.fu-vision.in