Numeric Data Types, Understanding Numeric Data Types in Java :-
The numeric types are the integral types and the floating-point types.
The integral types are byte, short, int, and long, whose values are 8-bit, 16-bit, 32-bit and 64-bit signed two's-complement integers, respectively, and char, whose values are 16-bit unsigned integers representing UTF-16 code units (#3.1).
The floating-point types are float, whose values include the 32-bit IEEE 754 floating-point numbers, and double, whose values include the 64-bit IEEE 754 floating-point numbers.
[Source: Java Language Specification, Primitive Types and Values]
int ,short ,byte andlong are floating-point typeschar values are 16-bit integersdouble can hold a value larger than the maximumfloat valuelong can hold a value greater than the maximumint value
0 Comments