day09--继承的格式和基本使用
This commit is contained in:
@@ -7,6 +7,7 @@ public static double floor(double a) :返回小于等于参数最大的整数
|
||||
public static long round(double a) :返回最接近参数的 long。(相当于四舍五入方法)
|
||||
*/
|
||||
public class MathDemo11 {
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
//获取绝对值
|
||||
@@ -19,4 +20,9 @@ public class MathDemo11 {
|
||||
System.out.println(Math.round(4.4));//4
|
||||
System.out.println(Math.round(4.5));//5
|
||||
}
|
||||
|
||||
public void methos() {
|
||||
System.out.println(Math.round(4.4));//4
|
||||
System.out.println(Math.round(4.5));//5
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user