Java 创建对象有几种方式? new 创建新对象 通过反射创建对象 采用 clone 机制 通过序列化机制
使用 new 关键字
public class MyClass {public MyClass() {System.out.println("MyClass object created!");}
}public class Main {public static voi…
Math 数学类 提供了一些相关数学计算的属性和方法、四舍五入、向上求整、向下求整、开平方,几次方 最大值和最小值 sin cos 绝对值
方法
1.Math 常用的字段 Math.PI
double x 2 * 180 / Math.PI;
Console.WriteLine(x);
2 Math.Abs() 求绝对值
int a -3;
Con…