• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

BigDecimal representation problem

 
Manuel Jordan
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello guys

i work with BigDecimal like 0.5 or other ugly numbers
my problem is how represent this number to format string 1/2 ?

i saw the api but nothing to help me,

thanks in advanced
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
BigDecimal doesn't support fractions, but Apache Commons Math does. Check out the Fractions class.
[ January 13, 2008: Message edited by: Ulf Dittmer ]
 
Manuel Jordan
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ulf

thanks for the reply

it works

thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic