开发者

Object vs. instance [duplicate]

开发者 https://www.devze.com 2023-02-21 23:17 出处:网络
This question already has answers here: Closed 11 years ago. Possible Duplicate: What is the difference between an Instance and an Object?
This question already has answers here: Closed 11 years ago.

Possible Duplicate:

What is the difference between an Instance and an Object?

What is the specific differ开发者_StackOverflowence between an object and an instance?


An object is an instance of a class.

When you instantiate a class, the result is an object of the class type.


In short, An object is a software bundle of related state and behavior. A class is a blueprint or prototype from which objects are created. An instance is a single and unique unit of a class.

Read this article: Class vs Object vs Instance

0

精彩评论

暂无评论...
验证码 换一张
取 消