• Post Reply Bookmark Topic Watch Topic
  • New Topic

Round off a value  RSS feed

 
Christie George
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

How do we round off a value to 6 decimal places and display it in a jsp?

Seb
 
pradeep jaladi
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi seb,

Get the value in to one float or double depand upon the value. import the util.* in the jsp page and use the desired function to round of the value .

Float f ;
f= 12.546465469546f;
Know the f value using the round function in java.util pack
i think this can help you.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not really a JSP question so moving along to the Java Intermediate forum.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!