Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

BigDecimal question

 
Saathvik Reddy
Ranch Hand
Posts: 228
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I want to check if the BigDecimal value is positive or negative. How can i do that? I didn't find any method which does this in the API.

Thanks,
Srikanth.
 
Campbell Ritchie
Sheriff
Pie
Posts: 48953
60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try the compareTo method and pass BigDecimal.ZERO.
 
Saathvik Reddy
Ranch Hand
Posts: 228
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ritchie it worked!
 
Campbell Ritchie
Sheriff
Pie
Posts: 48953
60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're welcome
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic