그래서 나는 학생들의 목록을 트리 맵에 집어 넣는 방법을 쓰려고하는데 트리 맵은 내 StudentViewcontroller에 있습니다. 나는 그것을 내 글쓰기 방법으로 써 줄 수있다. 당신이 개인 생성자를 가지고 있다면다른 클래스의 개인 생성자를 호출 할 수 있습니까?
public class StudentViewController {
//A tree map to store the students
private TreeMap<String, Student> studentMap = new TreeMap<String, Student>();
studentMap은 생성자가 아닌 StudentViewController의 비공개 필드처럼 보입니다. 포함하는 클래스 외부의 비공개 필드는 직접 액세스 할 수 없습니다. – mattnedrich
** [introspection] (http://docs.oracle.com/javase/tutorial/reflect/member/methodInvocation.html)으로 전화 할 수 있습니다. ** #justsayin ' –