Animal.java 422 B

123456789101112131415161718192021
  1. package J20250716.demo01_extends;
  2. /**
  3. * @author WanJl
  4. * @version 1.0
  5. * @title Animal
  6. * @description
  7. * @create 2025/7/16
  8. */
  9. public class Animal {
  10. public Animal(int a) {
  11. System.out.println("父类的无参的构造方法");
  12. }
  13. protected void move(){
  14. System.out.println("动物移动......");
  15. }
  16. public static void met(){
  17. System.out.println("父类的静态方法");
  18. }
  19. }