摘要:
package Demo513.Multi;public abstract class Animal { public static void main(String[] args) { Animal animal =new Cat(); animal.eat(); //往下转型:必须保证对象创建的就是猫, Cat cat=(Cat) ... 阅读全文
posted @ 2019-05-14 11:36
Ssinoo団子
阅读(170)
评论(0)
推荐(0)
摘要:
package Demo513.Multi;public class DemoMultiMethod { public static void main(String[] args) { //写法格式 父类名 对象名= new 子类名(); Employee one =new Teacher(); one.work(); Employee... 阅读全文
posted @ 2019-05-14 11:26
Ssinoo団子
阅读(288)
评论(0)
推荐(0)

浙公网安备 33010602011771号