Java Program For Decimal Data Type
Get Job-ready: Java Course with 45+ Real-time Projects! - Learn Java
Program 1
class TestDecimal
{
public static void main(String args[])
{
float f=12.555f;
System.out.println(f);
/*
float a, r=12.34f;
final float PI=3.14f;
a=PI*r*r;
System.out.println("\n Area is: "+a);
*/
}
}
Did you like our efforts? If Yes, please give DataFlair 5 Stars on Google

