//子类publicclassStrawberryextendsFruits{publicvoidprice()//子类新增成员{
System.out.println("Price:");
System.out.println(" The price of strawberries is about 15 yuan per catty.");}publicvoidBlueberriesPrice()//子类新增成员蓝莓{
System.out.println("Similar:");
System.out.println(" Blueberries is delicious!");
System.out.println(" The price of Blueberries is about 21 yuan per catty.");}publicvoidlike()//重写父类方法{
System.out.println("Taste:");
System.out.println(" Strawberries is very delicious!");}publicStrawberry()//无参构造{super();
System.out.println(" Strawberries have ornamental value");//观赏价值}publicStrawberry(int x)//有参构造{super(5);}}