它是什么意思类,对象,实例属性在面向对象编程? [英] what its mean by class, object, instance, attribute in object oriented programing ?

查看:343
本文介绍了它是什么意思类,对象,实例属性在面向对象编程?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经学会类是结构相同项目的蓝图,并使用类创建的项目被称为实例。
请让我知道什么是面向对象程序设计概念类,对象,实例和属性之间的区别。在对象,实例,属性一样吗?

i have learned class is a blueprint of structurally identical items, and the items created using class are called instances. please let me know what are the difference between class, object, instance and attribute in object oriented programming concept. is the object, instance, attribute same?

http://en.wikipedia.org/wiki/Class_(computer_programming)

推荐答案

通常情况下它们被用于像这样:

Typically they are used like so:


  • 类 - 蓝图创建对象实例;定义的属性和方法

  • 对象 - 代名词,通常情况下(有时用不当等同于类)

  • 实例 - 类的实际体现;类定义了该实例,而实例保存对象的值的属性和方法属性

  • 属性 - 通常与财产的代名词(对象成员,其值可以设置),但在一些动态语言,这也可以包括办法(对象成员可调用)

这篇关于它是什么意思类,对象,实例属性在面向对象编程?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆