import java.lang.*;
public class ClassLoadTest
{
static
{
System.out.println("由main()引起static!");
}
public static void main(String[] args)
{
System.out.println(Dog.Angry);
}
}
class Dog
{
public static String Angry="wolf....";
static
{
System.out.print("调用类的静态变量引起的");
}
}
//运行下就知道了原理啦!