Menu
Topics Index
...
`


Datatypes > Primtive Dataypes >
Siva Nookala - 16 Feb 2019
The floating-point data types are used to store decimal numbers like 3.45, -1267.89, 0.33424324, 0.00011, 4.0, 189.0 etc. Java supports two floating point types - float and double

The two floating point types in the order of size are:
Type Size Range Inclusive Samples
float 32-bits or 4 bytes 1.40e-45 to 3.40e+38 percentage of marks, batsmen average, run rate
double 64-bits or 8 bytes 4.9e-324 to 1.8e+308 high precision calculations, square roots, PI
  • Depending upon the requirement we should choose the appropriate data type

3-min video about floating point data types

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App