M
maozhuxi
Unregistered / Unconfirmed
GUEST, unregistred user!
小弟刚开始学java,在写helloword的时候遇到一个错误,请指教:
class zz
{
int qq;
}
public class qq
{
zz bian=new zz();
bian.qq=123;
int xx=bian.zz;
public static void main(String arg[])
{
System.out.println("helloworld");
System.out.println(xx);
}
}
抱错为:
--------------------Configuration: j2sdk1.4.2_04 <Default>--------------------
D:/Program Files/Xinox Software/JCreator LE/MyProjects/ZQ/qq.java:9: <identifier> expected
bian.qq=123;
^
1 error
class zz
{
int qq;
}
public class qq
{
zz bian=new zz();
bian.qq=123;
int xx=bian.zz;
public static void main(String arg[])
{
System.out.println("helloworld");
System.out.println(xx);
}
}
抱错为:
--------------------Configuration: j2sdk1.4.2_04 <Default>--------------------
D:/Program Files/Xinox Software/JCreator LE/MyProjects/ZQ/qq.java:9: <identifier> expected
bian.qq=123;
^
1 error