1、准备工作,创建一个Dog类。 package com.zjl.study.反射; /** * Created by zjl 2022/6/17 **/ public class Dog { private String name; private int age; private String color; public static String school; public static final String SCHOOL_NAME = "宠物学校"; public Dog() { } public