文件名称:public class A
下载
别用迅雷、360浏览器下载。
如迅雷强制弹出,可右键点击选“另存为”。
失败请重下,重下不扣分。
如迅雷强制弹出,可右键点击选“另存为”。
失败请重下,重下不扣分。
介绍说明--下载内容均来自于网络,请自行研究使用
创建一个类A,在A中编写一个可以被重写的带int类型参数的方法MyMethod,并在该方法中输出传递的整型值加10后的结果。
再创建一个类B,使其继承自类A,然后重写A中的MyMethod方法,将A中接收的整型值加50,并输出结果。
在Main方法中分别创建类A和类B的对象,并分别调用MyMethod方法(Create a class A, write a MyMethod that can be rewritten with int type parameter in A, and output the passed integer value plus 10 results in this method. Then create a class B to inherit from the class A, and then rewrite the MyMethod method in A, add 50 the integer value received in the A, and output the result. In the Main method, the objects of the class A and the class B are created respectively, and the MyMethod method is called respectively)
再创建一个类B,使其继承自类A,然后重写A中的MyMethod方法,将A中接收的整型值加50,并输出结果。
在Main方法中分别创建类A和类B的对象,并分别调用MyMethod方法(Create a class A, write a MyMethod that can be rewritten with int type parameter in A, and output the passed integer value plus 10 results in this method. Then create a class B to inherit from the class A, and then rewrite the MyMethod method in A, add 50 the integer value received in the A, and output the result. In the Main method, the objects of the class A and the class B are created respectively, and the MyMethod method is called respectively)
(系统自动生成,下载前可以参看下载内容)
下载文件列表
文件名 | 大小 | 更新时间 |
---|---|---|
public class A.doc | 20480 | 2017-11-29 |