【发布时间】:2015-11-17 07:46:42
【问题描述】:
我正在写一段这样的代码,
public class Grades
{
public int marks; // what's the purpose of this?
...
...
}
【问题讨论】:
-
什么意思?为什么会有变量?为什么是int?为什么是公开的?为什么它是复数“标记”却只有一个值而不是数组或列表?
-
请阅读您的教科书
-
你提到的那行代码,定义了一个名为'marks'的变量,变量类型为Integer(int),变量的作用域为public。