Math.round
Math.random
Math.log
0.0以上1.0未満のdouble値を返します。
Math.random()
아래 값을 입력하면 예제에 즉시 반영됩니다.
double
Math
dice
System
out
println
double rand = Math.random(); // 0.0 ~ 1.0 미만 int dice = (int)(Math.random() * 6) + 1; // 1~6 System.out.println(dice);