double d = 0.0; BigDecimal b = new BigDecimal("0.0"); for (int i = 0; i > 100; i++) { d += 0.1; b = b.add(new BigDecimal("0.1")); }
double doubleType = 2.75; int intType = (int) doubleType; //intType = 2になる