suppose work ge java, 唔知點解唔work..
line 24 cannot find symbol, 明明一開始已經定義左??
請問有冇人知問題出左係邊?>< thx!!
class Info{
String name;
String number;
String dept;
Info(String s, String n, String g){
name=s;
number=n; dept=g;
}
void showInfo(String s){
System.out.println("My name is "+name+".");
}
void showInfo(String s, String n){
System.out.println("My name is "+name+".");
System.out.println("Student number is "+number+".");
}
void showInfo
(String s, String n, String g){
System.out.println("My name is "+name+".");
System.out.println("Student number is "+number+".");
System.out.println("Gakubu is "+dept+".");
}
public static void main(String[] args){
Info k=new Info();
k.showInfo("SSS");
k.showInfo("SSS","092");
k.showInfo("SSS","092","business");
}
}