test011.java
public class test011
{
int x = 45;
static int y = 90;
public static void main(String[] args)
{
test011 temp = new test011();
System.out.println("x为类的实例变量:" + temp.x);
System.out.println("y为类的静态变量:" + test011.y);
}
}
test011.java
public class test011
{
int x = 45;
static int y = 90;
public static void main(String[] args)
{
test011 temp = new test011();
System.out.println("x为类的实例变量:" + temp.x);
System.out.println("y为类的静态变量:" + test011.y);
}
}
上一篇:java代码实例第12课
下一篇:java代码实例第9课
虾米大王教你学编程系列之java入门基础
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M