Definition:
Double and Float both are numerical data type which holds positive or negative with decimal points.
Difference:
Float – is suited for up to 7 decimal points
Double – is suited for up to 15 decimal points
Let’s see an example:
float variableName = 1.01;
double variableName2 = -1.02;
Java