class Monkey
{
private int n=100;
void speak(String s)
{
System.out.println(s);
}
}
class People extends Monkey
{
void compute(int a,int b)
{
int c=a+b;
System.out.println(a+"+"+b+"="+c);
}
void speak(String s)
{
System.out.println("**"+s+"**");
}
}
class E_up
{
public static void main(String[] args)
{
Monkey monkey=new People();
monkey.speak("fdfdfdfdfdf");
People people=(People) monkey;
people.compute(10,10);
}
}
class E_up
最新推荐文章于 2023-04-26 20:35:04 发布