package _06_面相对象综合练习.练习2;

public class Test {
    public static void main(String[] args) {
        Goods[] goods = new Goods[3];

        Goods goods1 = new Goods(1,"小米",1000,10);
        Goods goods2 = new Goods(2,"华为",3000,10);
        Goods goods3 = new Goods(3,"苹果",4000,10);

        goods[0]=goods1;
        goods[1]=goods2;
        goods[2]=goods3;

        for (Goods good : goods) {
            System.out.println(good);
        }

    }
}
