日期:2014-05-20 浏览次数:20675 次
import java.util.*;
public class Test2
{
public static void main(String[] args)
{
}
}
class A<T>
{
public A(T first, T second)
{
this.first = first;
this.second = second;
}
public T getName()
{
return first;
}
public T getAge()
{
return second;
}
private T first;
private T second;
}
class B
{
public B(String name, int age)
{
this.name = name;
this.age = age;
}
public String getName()
{
return name;
}
public int getAge()
{
return age;
}
private String name;
private int age;
}
class C extends B
{
public C(String name, int age, char gender)
{
super(name, age);
gender = 'F';
}
public void setName(String n)
{
name = n;
}
public void setAge(int m)
{
age = m;
}
public void setGender(char x)
{
gender = x;
}
public char getGender()
{
return gender;
}
private char gender;
}