Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Thelma Murray   on Oct 04 In Java Category.

  
Question Answered By: Bathilda Schmidt   on Oct 04

Use java.text.NumberFormat.

You'll want to do something like:

NumberFormat nf = NumberFormat.getNumberInstance();
nf.setMaximumFractionDigits(1);

and then do nf.format(yourdouble)

Share: 

 

This Question has 2 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Number Format Or get search suggestion and latest updates.


Tagged: