Comment on Tutorial - strictfp in Java 2 By Baski



Comment Added by : Jeff

Comment Added at : 2011-02-02 23:05:17

Comment on Tutorial : strictfp in Java 2 By Baski
Hello,
I would like to know how will take place rounding of value in case of strictfp
Say I have
float f = 1.2351111f;
and round it in second digit after dot.
System.out.println(String.format("%1.2f", f));
in case of strictfp and without strictfp it prints
1.24


View Tutorial



Subscribe to Tutorials

Related Tutorials

Program using concept of byte long short and int in java

Update contents of a file within a jar file

Tomcat and httpd configured in port 8080 and 80

Java File

Java String

Count number of vowels, consonants and digits in a String in Java

Reverse a number in Java

Student marks calculation program in Java

Handling Fractions in Java

Calculate gross salary in Java

Calculate average sale of the week in Java

Vector in Java - Sample Program

MultiLevel Inheritance sample in Java

Multiple Inheritance sample in Java

Java program using Method Overriding

Archived Comments

1. Good example...easy to read and understand...
View Tutorial          By: Codventure at 2009-09-11 00:07:06

2. Good and Effective example
thank you

View Tutorial          By: Perumal Naren at 2009-12-30 03:10:50

3. Excellent. I got stuck in a huge project and was f
View Tutorial          By: Rahul Tiwari at 2010-12-08 22:40:29

4. Hi, You can use a javascript array. Which means wh
View Tutorial          By: Mashoud at 2008-05-04 02:54:38

5. Thanks.. grt example
Also... If the type ar

View Tutorial          By: Shahid at 2011-12-20 10:26:22

6. i have same error sir..
Error applying tran

View Tutorial          By: CRUDZ at 2013-10-13 05:22:24

7. i am getting the following error:
cannot fi

View Tutorial          By: santhosh at 2009-09-24 09:13:57

8. Nice example but does not work on me, after execut
View Tutorial          By: Junjie Zhang at 2012-01-10 03:26:12

9. This tutorial is so simple, often we dont need to
View Tutorial          By: NIrjhar at 2011-12-12 03:29:52

10. i can saved when i run the program...
but w

View Tutorial          By: kathleen ashley at 2010-08-02 05:22:46