Float
public class Float{
public static void main(String[] args) {
float f1=123.00000f,f2=124.00000f;/* float declaration.We cannot declare it as
float f1=123.00000 because the default type of a number with decimal is double.*/
float f3=f1+f2;
System.out.println("Float value= "+f3);
}
}
Output:
Float value= 247.0