What is float in Java?

In java, Float is primitive data type having number with a decimal point. It contains number of fractional parts from 3.4e−038 to 3.4e+038. Note that you should end the value with an “f”.
There are two types of primitive floating point.

1.Float
The float data type requires 4 bytes means 32-bits for their storage. The number of digit after decimals point are know as precision are 7. The range of the precision lies between -3.4E38 to +3.4E38.
For Example:
public class Main {
public static void main(String[] args) {
float myNum = 2.89f;
System.out.println(myNum);
}
}
Output:
2.89
2.Double
When we need to work with large decimal numbers, we use Double floating data type. It use 8 bytes means 64-bits for their storage. Its digits precision are 15. The range of the precision lies between -1.7e308 to +1.7e308. Note that you should end the value with a “d”.
For example:
public class Main {
public static void main(String[] args) {
double myNum = 21.99d;
System.out.println(myNum);
}
}
Output:
21.99
For more information please click hear
https://learnwithshikha.com/how-to-find-multiples-of-a-float-value-in-java/