c程序的例子类人猿课程设计

时间:2013-03-30 14:09:00
【文件属性】:
文件名称:c程序的例子类人猿课程设计
文件大小:82KB
文件格式:DOC
更新时间:2013-03-30 14:09:00
dota class 类人猿 { private int n=100; void crySpeak(String s) { System.out.println(s); } } class People extends 类人猿 { void computer(int a,int b) { int c=a*b; System.out.println(c); } void crySpeak(String s) { System.out.println("**"+s+"**"); } } class Example4_19 { public static void main(String args[]) { 类人猿 monkey=new People(); monkey.crySpeak("I love this game"); People people=(People)monkey; people.computer(10,10); } }

网友评论