JAVA中使用字符串轉換爲數字

示例 1 : 四捨五入, 隨機數,開方,次方,π,天然常數 public class Sder { public static void main(String[] args) { float f1 = 5.4f; float f2 = 5.5f; //5.4四捨五入即5 System.out.println(Math.round(f1)); //5.5四捨五入即6 System.out.prin
相關文章
相關標籤/搜索