import java.math.BigDecimal; import java.math.MathContext; public class Java_BigDecimal_divideToIntegral_Bigdecimal_divisor_MathContext_mc { public static void main(String args[]) { BigDecimal deadly = new BigDecimal(500); BigDecimal isolation = new BigDecimal(3); MathContext mc = new MathContext(0); mc = MathContext.DECIMAL64; BigDecimal rogue = deadly.divideToIntegralValue(isolation, mc), saints[] = deadly.divideAndRemainder(isolation); System.out.println("Java Bigdecimal class \n\tdivideToIntegral" + "(Bigdecimal divisor" + " Mathcontext mc) method example"); System.out.println("\nBigdecimal class, rogue object values " + "\nQuotient(part before decimal) : " + rogue + "\nRemainder : " + saints[1]); } }