day10-引用数据类型转换(向上转型和向下转型)

This commit is contained in:
2026-05-27 16:58:43 +08:00
parent b991c929a5
commit 1e4b3cd7a0
5 changed files with 62 additions and 6 deletions

View File

@@ -0,0 +1,9 @@
package com.inmind.duotai08.downcast;
public abstract class Animal {
String name;
int age;
//吃的行为
public abstract void eat();
}