对象数组(初学)

package day01;

public class Case08 {
public static void main(String[] args) {
Student [] array=new Student[3];
Student one= new Student("ly",22);
Student two= new Student("ly",22);
Student three= new Student("ly",22);
array[0]=one;
array[1]=two;
array[2]=three;
System.out.println(array);//dizhi
}
}

猜你喜欢

转载自www.cnblogs.com/worldof/p/10670301.html