• Post Reply Bookmark Topic Watch Topic
  • New Topic

setting BigDecimal variable?  RSS feed

 
Nicole Jones
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i'm having trouble finding a solution to setting a BigDecimal variable to empty. For example:



any info is greatly appreciated
 
Luigi Plinge
Ranch Hand
Posts: 441
IntelliJ IDE Scala Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just do it in the same way as you would set any other BigDecimal
 
Stephan van Hulst
Saloon Keeper
Posts: 7993
143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yeah, BigDecimal.ZERO would be the preferred way, since it doesn't allocate a new object.
 
Nicole Jones
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you!
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!