Check out example codes for "bigdecimal divide java". It will help you in understanding the concepts better.

Code Example 1

BigDecimal mark1 = new BigDecimal("78");
        BigDecimal total = new BigDecimal("100");
        BigDecimal c = mark1.divide(total, 2, RoundingMode.HALF_UP);

Learn ReactJs, React Native from akashmittal.com