I have Hibernate method which returns me a BigDecimal. I have another API method to which I need to pass that number but it accepts Integer as parameter. I cannot change ret
Following should do the trick:
BigDecimal d = new BigDecimal(10); int i = d.intValue();
Have you tried calling BigInteger#intValue() ?