java oop : 메모리에 객체 생성과정

This commit is contained in:
haerong22
2021-03-07 15:35:21 +09:00
parent 7df93548f9
commit 61893a9dcb
5 changed files with 86 additions and 0 deletions

16
JavaOOP/src/Java12.java Normal file
View File

@@ -0,0 +1,16 @@
import object.PrivateConstructor;
public class Java12 {
public static void main(String[] args) {
// // 생성자가 private 이므로 객체 생성 불가
// PrivateConstructor pc = new PrivateConstructor();
//
// // non-static-method 사용 불가
// PrivateConstructor.nonStaticMethod();
// static-method 만 사용가능
PrivateConstructor.staticMethod();
}
}