You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This discussion was converted from issue #55 on November 24, 2024 11:22.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Note
이 글에서는 클래스, 객체, 인스턴스가 무엇이며, 이들 사이의 관계가 어떻게 되는지를 예시와 함께 알기 쉽게 설명합니다.
#️⃣ Intro
클래스는 붕어빵 틀, 객체는 붕어빵 🍞
#️⃣ 클래스(Class)
클래스
는 객체를 만들어 내기 위한 설계도입니다.객체가 가져야 할 속성(변수)과 기능(메서드)을 정의합니다.
#️⃣ 객체(Object)
객체
는 클래스로부터 생성된 실제 대상입니다.메모리에 존재하며, 속성을 갖고 기능을 수행할 수 있습니다. 이렇게 만들어진 각각의 객체는 서로 독립적인 상태를 가집니다.
#️⃣ 인스턴스(Instance)
인스턴스
는 특정 클래스로부터 생성된 객체를 뜻합니다.객체가
어떤 클래스로부터 만들어졌는지
,어떤 클래스에 속해있는지
를 강조하고 싶을 때인스턴스
라는 용어를 사용합니다.#️⃣ Summary
클래스
는 객체를 만들어 내기 위한 설계도입니다.객체
는 클래스로부터 생성된 실제 대상입니다.인스턴스
는 특정 클래스로부터 생성된 객체를 뜻합니다.Beta Was this translation helpful? Give feedback.
All reactions