扩充( extends)父类别 Chicken chicken1= new Chicken("小克","红色小鸡冠"); Chicken chicken new Chicken(i System.out. printf("小雞1-名称号s,鸡冠是号s。\n", chicken getName(), chicken. getcrest ())i chicken. wu() System. out.printf("小雞2-名称号s,鸡冠是号s。\n", chicken getName(), chicken. getcrest())i chicken. wu()i扩充(extends)父类别 Chicken chicken1 = new Chicken("小克","红色小鸡冠"); Chicken chicken2 = new Chicken(); System.out.printf("小雞1 -名称%s,鸡冠是%s。\n", chicken1.getName(), chicken1.getCrest()); chicken1.wu(); System.out.printf("小雞2 -名称%s,鸡冠是%s。\n", chicken2.getName(), chicken2.getCrest()); chicken2.wu();