为什么要“分类"?在Java中上课? [英] Why "class" for class in Java?

查看:64
本文介绍了为什么要“分类"?在Java中上课?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为什么Java的创建者将名称"class"用于Java中的类?这个词是哪里来的?

Why did the creators of Java use the name "class" for the classes in Java? Where does this term come from?

推荐答案

Java并没有发明名称类-它在以前的语言中使用过,例如C ++.

Java didn't invent the name class - it was used in languages prior, like C++.

我认为名称类"是指对象的类,例如分类(或类型)中的对象.然后,对象就是该类型的实例.

I think the name "class" refers to a class of objects, as in a classification (or a type). And then an object is an instance of that type.

这是Dictionary.com中类"的第一个定义:

Here is the first definition of "class" from dictionary.com:

  1. 一些人或事物被理性地视为一个群体共同的属性,特征品质或特质;种类;排序.

因此,这与我们所知道的计算机科学课是一致的-特征/质量/特征"是领域和方法.

So this is right in line with what we know to be a class in computer science - the "characteristics/qualities/traits" being fields and methods.

这篇关于为什么要“分类"?在Java中上课?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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