//属性 成员变量 String name; int age; String color; //方法 函数 成员函数 void name() { System.out.println("名字为"+name); } void showAge() { System.out.println("年龄为"+age); } void jiao() { System.out.println("喵"); } void yanse() { System.out.println(color); }
时间: 2024-08-06 19:13:53