ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] HALF_DOWN©MHALF_UPªº®t§O?

[µo°Ý] HALF_DOWN©MHALF_UPªº®t§O?

µ{¦¡½X¦p¤U:
package _03.bigdecimal;
import java.math.BigDecimal;
import java.math.RoundingMode;
public class BigDecimalDemo {
        public static void main(String[] args) {
                BigDecimal bd2=BigDecimal.valueOf(11);
                BigDecimal bd3=new BigDecimal("2.3");
                BigDecimal bdDiv = bd2.divide(bd3,38,RoundingMode.HALF_UP);
                System.out.println(bdDiv);
                BigDecimal bdDivDOWN = bd2.divide(bd3,10, RoundingMode.HALF_DOWN);
                System.out.println(bdDivDOWN);               
                BigDecimal bdDivUP = bd2.divide(bd3,10, RoundingMode.HALF_UP);
                System.out.println(bdDivUP);
        }
}

½sĶµ²ªG¦p¤U:
4.78260869565217391304347826086956521739
4.7826086957
4.7826086957

½Ð°ÝbdDivDOWN ¬°¤°»ò©MbdDivUP ªºµª®×¬Û¦P?
JACK

        ÀR«ä¦Û¦b : ¯à¥I¥X·R¤ß´N¬OºÖ¡A¯à®ø°£·Ð´o´N¬O¼z¡C
ªð¦^¦Cªí ¤W¤@¥DÃD