W
wait_for_love
Unregistered / Unconfirmed
GUEST, unregistred user!
class DClass{
String name;
int birth;
DClass(String s,int i){
name=s;
birth=i;
}
public void show(){
System.out.println("name="+name);
System.out.println("birth="+birth);
}
}
class SClass extends DClass{
int sex=1;
SClass(String s,int i){
super(s,i);
}
public void show(){
System.out.println("name="+super.name);
if (sex==1)
System.out.println("sex=man");
else
System.out.println("sex=woman");
}
}
class a0508{
public static void main(String args[]){
DClass d=new DClass("AAA",19050101);
SClass s=new SClass("bbb",45268318);
s.show();
}
}
请问输出什么?
String name;
int birth;
DClass(String s,int i){
name=s;
birth=i;
}
public void show(){
System.out.println("name="+name);
System.out.println("birth="+birth);
}
}
class SClass extends DClass{
int sex=1;
SClass(String s,int i){
super(s,i);
}
public void show(){
System.out.println("name="+super.name);
if (sex==1)
System.out.println("sex=man");
else
System.out.println("sex=woman");
}
}
class a0508{
public static void main(String args[]){
DClass d=new DClass("AAA",19050101);
SClass s=new SClass("bbb",45268318);
s.show();
}
}
请问输出什么?