首页 新闻 赞助 找找看

新手求教,java 这个程序哪出错了啊?

0
悬赏园豆:5 [已解决问题] 解决于 2012-03-01 09:49
public class Sample_1 {
class Student{
int sage;
String sname;
String sclass;

}
public static void main(String[] args) {
Student tom;
tom= new Student();
Student jerry;
jerry = new Student();
tom.sage =14;
tom.sname ="Tom";
tom.sclass = "123";
jerry.sage=15;
jerry.sname="Jerry";
jerry.sclass="1233";
System.out.println("sname="+tom.sname+",sage="+tom.sage+",sclass="+tom.sclass);
System.out.println("sname="+jerry.sname+",sage="+jerry.sage+",sclass="+jerry.sclass);

}
}
夜雨星辰-的主页 夜雨星辰- | 初学一级 | 园豆:194
提问于:2012-03-01 09:42
< >
分享
最佳答案
0

类没理解好...懂了

夜雨星辰- | 初学一级 |园豆:194 | 2012-03-01 09:49
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册