public class StudentTest {


public static void main(String[] args) {

// TODO Auto-generated method stub

Student studentArray [] = new Student[3];

studentArray[0] = new Student("홍길동", 15, 170, 80);

studentArray[1] = new Student("한사람", 13, 180, 70);

studentArray[2] = new Student("임걱정", 16, 175, 65);

}

}


이렇게 해도 됨? 객체 배열 선언할떄 첨에 3개 new 했는데 나중에 또 new 를 하나씩 3번 하는데

이래도 원래 되는거임? 메모리 누수 없음?

첨에는 초기화로 할당만 해놓고 생성자는 이렇게 뒤늦게 호출해도 원래 되는거임?