Java 若要將浮點數,也就是原始型別為 float 或 double 的小數點部分做四捨五入, ... double d = 1.999; System.out.println(Math.round(d)); // 2 ...
確定! 回上一頁