In Java, there are different numeric data types to represent whole numbers(integral) and fractions(floating-point) of different sizes (magnitudes).
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-bitsignedtwo’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 and long are floating-point types
- char values are 16-bit integers
- double can hold a value larger than the maximum float value
- long can hold a value greater than the maximum int value
Candidates having any kind of query so he/she can ask in our comment section. Our Panel will b reverting back as soon as possible. Thank You. For more details visit our website (https://speedjobalert.com/)