Java program to show use of floating pointe values

Java program to show use of floating pointe values or float data type.

Note :-
  • Place small or capital F after your float value otherwise
  • it will show error coz java does not support direct floating  point storage

[java]

class Floating_Point_Value
{

public static void main(String args[])
{

float x = 3.1525f;
System.out.println("Float value of x = " + x);

}
}

[/java]

Share

About the Author

Akash Padhiyar

Visit Website

There are no comments yet, add one below.

Leave a Comment

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

*

Time limit is exhausted. Please reload CAPTCHA.