SlideShare a Scribd company logo
1 of 4
클래스와 객체 ( 인스턴스 )

          한병호
   (bhhan777@gmail.com)
클래스 내의 변수 들의 역할
• 메모리를 어떻게 분할할 것인지를 나타
  냄.
• 클래스 선언
 – Person p; ( 레퍼런스 형 : 클래스에 대한 참
   조)
• 메모리 생성
 – Person p = new Person();
 – 여기서 할당된 메모리 공간은 힙영역
객체 ( 인스턴스 ) 의 참조
• 스택영역에 위치한 레퍼런스 ( 참조 ) 변
  수를 사용
• Stack 프레임
 – 메모리 덩어리로 메서드 하나당 하나의 스택
   프레임이 존재
• 다음 장에서 전체적인 메모리 구조를 그
  림으로 표시
전체 메모리 영역

                      힙영역 ( 크기는 전
  응용프로그램 영역           체 메모리 영역
                      안)
 상수 메모리 영역 (static)
 코드 메모리 영역
 스택 메모리 영역 ( 레퍼런스 )




 클래스와 객체 ( 인스턴스 )
 이상이 전체적인 메모리안에서의 클래스와 객체에 대한 정리

More Related Content

Viewers also liked

국내 블로그 마케팅의 명과 암
국내 블로그 마케팅의 명과 암국내 블로그 마케팅의 명과 암
국내 블로그 마케팅의 명과 암TNM Media
 
Contactually & HappyFox: The 7 Secrets to Success - How The Best Companies Ke...
Contactually & HappyFox: The 7 Secrets to Success - How The Best Companies Ke...Contactually & HappyFox: The 7 Secrets to Success - How The Best Companies Ke...
Contactually & HappyFox: The 7 Secrets to Success - How The Best Companies Ke...Contactually
 
The DNA of an Innovative Product Owner by Anu Smalley
The DNA of an Innovative Product Owner by Anu SmalleyThe DNA of an Innovative Product Owner by Anu Smalley
The DNA of an Innovative Product Owner by Anu SmalleyAccenture | SolutionsIQ
 
The Little Red Book
The Little Red BookThe Little Red Book
The Little Red BookIshraq Dhaly
 
From new trader to great
From new trader to greatFrom new trader to great
From new trader to greatsmbcapital
 
Westbury Fiat Sale
Westbury Fiat SaleWestbury Fiat Sale
Westbury Fiat Salejspornfiat
 
HCI - Human Computer Interaction
HCI - Human Computer InteractionHCI - Human Computer Interaction
HCI - Human Computer Interactioncheonsu park
 
Film 260 digital flipbook
Film 260 digital flipbookFilm 260 digital flipbook
Film 260 digital flipbookCelinaChidwick
 
Year End Fundraising Assoc Fundraising Professionals (MD) Presentation
Year End Fundraising Assoc Fundraising Professionals (MD) PresentationYear End Fundraising Assoc Fundraising Professionals (MD) Presentation
Year End Fundraising Assoc Fundraising Professionals (MD) Presentationastaten
 
Cluster based epidemic control through smartphone-based body area networks
Cluster based epidemic control through smartphone-based body area networksCluster based epidemic control through smartphone-based body area networks
Cluster based epidemic control through smartphone-based body area networksieeeprojectsbangalore
 
Managing a Wild and Scenic River - The Wild and Scenic Rivers Act and Compreh...
Managing a Wild and Scenic River - The Wild and Scenic Rivers Act and Compreh...Managing a Wild and Scenic River - The Wild and Scenic Rivers Act and Compreh...
Managing a Wild and Scenic River - The Wild and Scenic Rivers Act and Compreh...rshimoda2014
 

Viewers also liked (18)

Yo no he sido
Yo no he sidoYo no he sido
Yo no he sido
 
국내 블로그 마케팅의 명과 암
국내 블로그 마케팅의 명과 암국내 블로그 마케팅의 명과 암
국내 블로그 마케팅의 명과 암
 
Coniferous Forest
Coniferous ForestConiferous Forest
Coniferous Forest
 
Contactually & HappyFox: The 7 Secrets to Success - How The Best Companies Ke...
Contactually & HappyFox: The 7 Secrets to Success - How The Best Companies Ke...Contactually & HappyFox: The 7 Secrets to Success - How The Best Companies Ke...
Contactually & HappyFox: The 7 Secrets to Success - How The Best Companies Ke...
 
The DNA of an Innovative Product Owner by Anu Smalley
The DNA of an Innovative Product Owner by Anu SmalleyThe DNA of an Innovative Product Owner by Anu Smalley
The DNA of an Innovative Product Owner by Anu Smalley
 
The Little Red Book
The Little Red BookThe Little Red Book
The Little Red Book
 
From new trader to great
From new trader to greatFrom new trader to great
From new trader to great
 
Westbury Fiat Sale
Westbury Fiat SaleWestbury Fiat Sale
Westbury Fiat Sale
 
HCI - Human Computer Interaction
HCI - Human Computer InteractionHCI - Human Computer Interaction
HCI - Human Computer Interaction
 
Nine years after sept 11
Nine years after sept 11Nine years after sept 11
Nine years after sept 11
 
mohamed Elraw
mohamed Elrawmohamed Elraw
mohamed Elraw
 
Film 260 digital flipbook
Film 260 digital flipbookFilm 260 digital flipbook
Film 260 digital flipbook
 
Directions
DirectionsDirections
Directions
 
Learning outcome 1
Learning outcome 1Learning outcome 1
Learning outcome 1
 
Year End Fundraising Assoc Fundraising Professionals (MD) Presentation
Year End Fundraising Assoc Fundraising Professionals (MD) PresentationYear End Fundraising Assoc Fundraising Professionals (MD) Presentation
Year End Fundraising Assoc Fundraising Professionals (MD) Presentation
 
Cluster based epidemic control through smartphone-based body area networks
Cluster based epidemic control through smartphone-based body area networksCluster based epidemic control through smartphone-based body area networks
Cluster based epidemic control through smartphone-based body area networks
 
Scrum on rails
Scrum on railsScrum on rails
Scrum on rails
 
Managing a Wild and Scenic River - The Wild and Scenic Rivers Act and Compreh...
Managing a Wild and Scenic River - The Wild and Scenic Rivers Act and Compreh...Managing a Wild and Scenic River - The Wild and Scenic Rivers Act and Compreh...
Managing a Wild and Scenic River - The Wild and Scenic Rivers Act and Compreh...
 

Recently uploaded

Merge (Kitworks Team Study 이성수 발표자료 240426)
Merge (Kitworks Team Study 이성수 발표자료 240426)Merge (Kitworks Team Study 이성수 발표자료 240426)
Merge (Kitworks Team Study 이성수 발표자료 240426)Wonjun Hwang
 
Continual Active Learning for Efficient Adaptation of Machine LearningModels ...
Continual Active Learning for Efficient Adaptation of Machine LearningModels ...Continual Active Learning for Efficient Adaptation of Machine LearningModels ...
Continual Active Learning for Efficient Adaptation of Machine LearningModels ...Kim Daeun
 
A future that integrates LLMs and LAMs (Symposium)
A future that integrates LLMs and LAMs (Symposium)A future that integrates LLMs and LAMs (Symposium)
A future that integrates LLMs and LAMs (Symposium)Tae Young Lee
 
Console API (Kitworks Team Study 백혜인 발표자료)
Console API (Kitworks Team Study 백혜인 발표자료)Console API (Kitworks Team Study 백혜인 발표자료)
Console API (Kitworks Team Study 백혜인 발표자료)Wonjun Hwang
 
MOODv2 : Masked Image Modeling for Out-of-Distribution Detection
MOODv2 : Masked Image Modeling for Out-of-Distribution DetectionMOODv2 : Masked Image Modeling for Out-of-Distribution Detection
MOODv2 : Masked Image Modeling for Out-of-Distribution DetectionKim Daeun
 
캐드앤그래픽스 2024년 5월호 목차
캐드앤그래픽스 2024년 5월호 목차캐드앤그래픽스 2024년 5월호 목차
캐드앤그래픽스 2024년 5월호 목차캐드앤그래픽스
 

Recently uploaded (6)

Merge (Kitworks Team Study 이성수 발표자료 240426)
Merge (Kitworks Team Study 이성수 발표자료 240426)Merge (Kitworks Team Study 이성수 발표자료 240426)
Merge (Kitworks Team Study 이성수 발표자료 240426)
 
Continual Active Learning for Efficient Adaptation of Machine LearningModels ...
Continual Active Learning for Efficient Adaptation of Machine LearningModels ...Continual Active Learning for Efficient Adaptation of Machine LearningModels ...
Continual Active Learning for Efficient Adaptation of Machine LearningModels ...
 
A future that integrates LLMs and LAMs (Symposium)
A future that integrates LLMs and LAMs (Symposium)A future that integrates LLMs and LAMs (Symposium)
A future that integrates LLMs and LAMs (Symposium)
 
Console API (Kitworks Team Study 백혜인 발표자료)
Console API (Kitworks Team Study 백혜인 발표자료)Console API (Kitworks Team Study 백혜인 발표자료)
Console API (Kitworks Team Study 백혜인 발표자료)
 
MOODv2 : Masked Image Modeling for Out-of-Distribution Detection
MOODv2 : Masked Image Modeling for Out-of-Distribution DetectionMOODv2 : Masked Image Modeling for Out-of-Distribution Detection
MOODv2 : Masked Image Modeling for Out-of-Distribution Detection
 
캐드앤그래픽스 2024년 5월호 목차
캐드앤그래픽스 2024년 5월호 목차캐드앤그래픽스 2024년 5월호 목차
캐드앤그래픽스 2024년 5월호 목차
 

클래스와 객체

  • 1. 클래스와 객체 ( 인스턴스 ) 한병호 (bhhan777@gmail.com)
  • 2. 클래스 내의 변수 들의 역할 • 메모리를 어떻게 분할할 것인지를 나타 냄. • 클래스 선언 – Person p; ( 레퍼런스 형 : 클래스에 대한 참 조) • 메모리 생성 – Person p = new Person(); – 여기서 할당된 메모리 공간은 힙영역
  • 3. 객체 ( 인스턴스 ) 의 참조 • 스택영역에 위치한 레퍼런스 ( 참조 ) 변 수를 사용 • Stack 프레임 – 메모리 덩어리로 메서드 하나당 하나의 스택 프레임이 존재 • 다음 장에서 전체적인 메모리 구조를 그 림으로 표시
  • 4. 전체 메모리 영역 힙영역 ( 크기는 전 응용프로그램 영역 체 메모리 영역 안) 상수 메모리 영역 (static) 코드 메모리 영역 스택 메모리 영역 ( 레퍼런스 ) 클래스와 객체 ( 인스턴스 ) 이상이 전체적인 메모리안에서의 클래스와 객체에 대한 정리