September 25

Java BigDecimal is negative?

8  comments

To check if a BigDecimal in Java is negative use the signum() method like it’s shown in the following snippet:


Tags

BigDecimal, Java, Snippets


You may also like

Blog url changed to https

Format date and time in java with prettytime

Leave a Reply

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.

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}

Subscribe to our newsletter now!