I have a BigDecimal
object, which I am checking for its value (greater or smaller than 100).
public static void main(String[] args) {
BigDecimal obj = new BigDecimal("100.3");
if (obj.intValue() > 100)
{
System.out.println("Greater than 100");
}
else
{
System.out.println("Not greater than 100");
}
}
But it's showing:
Not greater than 100