扩充( extends)父类别 使用" extends"作为其扩充父类别的矢键词 public class bird i private string name; public Bird( public bird(string name) I this name name public void walk() i System.out. print1n("走路") public string getName()[ return name; public void setName(string name) i this name aime i扩充(extends)父类别 • 使用"extends"作为其扩充父类别的关键词 public class Bird { private String name; public Bird() { } public Bird(String name) { this.name = name; } public void walk() { System.out.println("走路"); } public String getName() { return name; } public void setName(String name) { this.name = name; } }