/*
Java float Example
This Java Example shows how to declare and use Java primitive float variable
inside a java class.
*/
import java.util.*;
public class JavaFloatExample {
public static void main(String[] args) {
/*
* float is 32 bit single precision type and used when fractional precision
* calculation is required.
*
* Declare float varibale as below
*
* float = ;
*
* here assigning default value is optional.
*/
float f = 10.4f;
System.out.println("Value of float variable f is :" + f);
}
}
/*
Output would be
Value of float variable f is :10.4
*/