开发者

Object vs. instance [duplicate]

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜