public class Student {
private static int age;
private double score;
public void run(){
}
public static void go(){
}
public static void main(String[] args) {
go();
}
}
public class Person {
static {
System.out.println("静态代码块");
}
{
System.out.println("匿名代码块");
}
public Person() {
System.out.println("构造方法");
}
public static void main(String[] args) {
Person person = new Person();
System.out.println("=======================");
Person person1 = new Person();
}
}
import static java.lang.Math.PI;
import static java.lang.Math.random;
public class Test {
public static void main(String[] args) {
System.out.println(random());
System.out.println(PI);
}
}