코딩공부

[40m] Objects vs Instances

milimiliemilie 2025. 3. 10. 22:23

 
# Objects vs Instances
 - Objects가 더 class에 직접 연결된 느낌이라고 보면 됨..... (사실 잘 모르겠다! 하지만 코딩을 하다 보면 느낌이 오겠쥐.)
 

 
 
 - 출처: https://stackoverflow.com/questions/3323330/difference-between-object-and-instance/42753129#42753129

Difference between object and instance

I know this sort of question has been asked before, but I still feel that the answer is too ambiguous for me (and, by extension, some/most beginners) to grasp. I have been trying to teach myself b...

stackoverflow.com

 
(3/12 Wed. 더 찾아본 이야기)
# 구글 AI 결과:
In computing, an instance is a single occurrence of an object, while an object is a concrete thing built from a class. The terms "instance" and "object" are often used interchangeably.

- Explanation
Class: A blueprint or template that defines the structure of an object
Object: A concrete thing built based on the class, such as a house built from a blueprint
Instance: A single occurrence of an object, or a virtual copy of an object

In programming, an object is an instance of a class. The variables in an object are called instance variables, and the methods in an object are called instance methods.

- Examples
If you create multiple 3-bedroom homes (objects) from a blueprint (class), you can refer to a specific home (object) as an instance
In Java, instance methods are functions defined within a class that require an object of that class to be created before calling

(근데 봐도 모르겠다! 역시 코딩을 해보면서 알게 되겠지…)


# 다음에 할 일
 - Object literals, Object.create(), Constructors: 이제 Object.create()를 알아보기
... 이걸 보자: https://youtu.be/d38gsOZKoVY?si=EqGHpWJvPcTxqF1a
 - async-await 따라해보기. (하다 말았음): https://milimiliemilie.tistory.com/11 여기의 JS Crash course 참고.

'코딩공부' 카테고리의 다른 글

[25m] setTimeout, async-await, forEach, ...  (0) 2025.03.24
[8m] object.create()  (0) 2025.03.19
[15m] Object literals & Constructors  (0) 2025.02.27
[40m] 도전문제 완료  (0) 2025.02.26
[15m] 도전문제2 완료  (0) 2025.02.25