무지성 메모
■Singleton패턴의 객체를 외부에서 생성했을 때 생기는 오류
배게
2021. 7. 15. 13:20
728x90
Company c3 = new Company(); 가 안되는 이유는 Company객체의 기본 constructor가 private이기 때문이다.
breakpoint 눌러서 자동으로 고치게 하면 constructor가 visible하게 바뀜(private만 딱 사라짐)