Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Decimal formatting of  RSS feed

 
Melissa Atty
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is my first post at the ranch. I was hoping someone could help me figure out how to return a decimal value with 2 decimal places. Currently I am getting '6%' as the output and I would like to get say, 6.19%. I'm dividing two ints to get the 6 and I need to know how to format the ints to (I guess) a double and then format the double value to two decimal places. Thanks for the help.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66203
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch Melissa. We have a forum for general Java questions such as this. I'm moving this topic there for you.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!