September 25, 2009
To check if a BigDecimal in Java is negative use the signum() method like it’s shown in the following snippet:
public static boolean isNegative(BigDecimal b)
b.signum() == -1;
BigDecimal, Java, Snippets
Your email address will not be published. Required fields are marked
Information about Data protection
This site uses Akismet to reduce spam. Learn how your comment data is processed.
Thanks, you saved my day…
many many thanks
very nice. for more java examples, visit http://java2novice.com site
Thanks, was really useful.
Thanks! very simple and it works!