member
A field or method of a class. Unless specified otherwise, a member is not static.
一个类由域和方法构成。
variable
An item of data named by an identifier. Each variable has a type, such as int or Object, and a scope. See also class variable, instance variable, local variable.
一共有三种变量:类变量、实例变量和局部变量。
class variable = static field
A data item associated with a particular class as a whole–not with particular instances of the class. Class variables are defined in class definitions. Also called a static field. See also instance variable.
与类本身在一起,而非类创建的实例。
instance variable = field
Any item of data that is associated with a particular object. Each instance of a class has its own copy of the instance variables defined in the class. Also called a field. See also class variable.
field
A data member of a class. Unless specified otherwise, a field is not static.
由类创建出的实例的变量,与实例在一起。
local variable
A data item known within a block, but inaccessible to code outside the block. For example, any variable defined within a method is a local variable and can’t be used outside the method.
方法里创建的变量。还有循环体。
constructor
A pseudo-method that creates an object. In the Java™ programming language, constructors are instance methods with the same name as their class. Constructors are invoked using the new keyword.
与类同名的实例伪方法。
- 来源:
Java 官方说明文档:
https://docs.oracle.com/javase/tutorial/information/glossary.html