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

courses

TechVidvan Team

TechVidvan Team provides high-quality content & courses on AI, ML, Data Science, Data Engineering, Data Analytics, programming, Python, DSA, Android, Flutter, full stack web dev, MERN, and many latest technology.

Leave a Reply

Your email address will not be published. Required fields are marked *