public class MyStudent{
private String stuName;
private String stuAge;
private String stuSex;
public static void setVar(String name,int age,String sex){
stuName=name;
stuAge=age;
stuSex=sex;
}
public static void setSex(String sex){
String stuSex=sex;
}
public static String getName(){
return stuName;
}
public static int getAge(){
return stuAge;
}
public static String getSex(){
return stuSex;
}
public static void main(String[] args){
setVar("maomao",22,"nan");
setSex("nv");
String myMame=getName();
System.out.println(myName);
int myAge=getAge();
System.out.println(myAge);
String mySex=getSex();
System.out.println(mySex);
}
}
怎么报这么多错误啊,哪个有时间帮我看看 初学者.
[此贴子已经被作者于2006-10-18 12:02:24编辑过]