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

14
JavaOOP/src/Java11.java Normal file
View File

@@ -0,0 +1,14 @@
import object.BookVO;
public class Java11 {
public static void main(String[] args) {
// 생성자 -> 생성 + 초기화 -> 중복정의
BookVO b = new BookVO("자바",20000,"길벗",790);
System.out.println(b.title);
System.out.println(b.price);
System.out.println(b.company);
System.out.println(b.page);
}
}