package com.lovecoding.day08.oop07;

public class TestArrObject1 {

    public static void main(String[] args) {
        //数组存储对象
        //静态
        Student s1 = new Student();
        s1.name = "高启盛";
        s1.age = 22;

        Student s2 = new Student();
        s2.name = "高启强";
        s2.age = 21;

        Student[] arr = new Student[2];
        arr[0] = s1;
        arr[1] = s2;

        //获取 遍历
        for (int i = 0; i < arr.length; i++) {
            arr[i].getInfo(); //地址
        }

    }

}
