package test.two;
public class jingtaihanshu
{
int x = 3;
static int y = 4;
public static void Method()//静态方法
{
System.out.println("实例变量x = " + new jingtaihanshu().x);
System.out.println("静态变量y = " + y);
}
public static void void main(String[] args)
{jingtaihanshu.Method();
jingtaihanshuex = new jingtaihanshu();
System.out.println("x = " + ex.x);
}
}
标签:静态数据,静态方法,System,访问,static,jingtaihanshu,public,out From: https://www.cnblogs.com/zbw-m/p/16768520.html