| | |
Diplaying floating point values
Thread Solved |
You'll need to use a formatter like DecimalFormat or String.format().
java Syntax (Toggle Plain Text)
float value = 0.60f; DecimalFormat df = new DecimalFormat("0.00"); String formattedValue = df.format(value);
![]() |
Similar Threads
- a simple way to print a binary representation of a floating point number? (C++)
- Floating point multiplication, precision issues (C++)
- floating point : overflow error (C)
- Dynamic Array, Writing to CSV, Floating Point ?'s (C)
- IEEE Floating-point fromat (C)
- Floating Point Representation (Computer Science)
- Drop 0 in floating point variable 0.233 (C++)
- Floating point numbers (C++)
- floating point (C++)
Other Threads in the Java Forum
- Previous Thread: map ResultSet to objects
- Next Thread: Query about static nested classes
| Thread Tools | Search this Thread |
6 @param actuate android api applet application arc array arrays automation balls binary bluetooth bold business byte c++ chat class client code codesnippet collections compare component coordinates database defaultmethod detection doctype dragging ebook eclipse educational error file fractal froglogic game givemetehcodez graphics gui guitesting helpwithhomework hql html ide ideas image ingres input integer internet intersect invokingapacheantprogrammatically j2me java javaexcel javaprojects jni jpanel jtextarea julia linux list map method methods mobile mysql netbeans newbie nextline parameter php pong problem program programming project recursion recursive scanner sell server set sms sort sql string sun swing swt terminal threads tree web websites windows






