关于接口的问题
package ch04.j09.exam2;public class AA
{
private int x;
public double y;
protected char z;
String w;
}
public AA(int a,double b,char c,String d)
{
x=a;
y=b;
z=c;
w=d;
}
private int getX()
{
return x;
}
public double getY()
{
return y;
}
protected char getZ()
{
return z;
}
String getW()
{
return w;
}
import ch04.j09.exam2.AA;
public class ATest
{
public static void main(String args[])
{
AA object=new AA(1,1.11,'q',"Hello World");
/*
object.x=2;
obj.getX(); */
/*
object.y=2.22;
obj.getY(); */
/*
obj.z='e';
obj.getZ(); */
/*
obj.w="lala";
obj.getW(); */
}
}
当程序运行的时候会提示“需要“class”或“接口””是什么意思?(我用的是Jcreator运行的)