Reputation: 31
Source: http://docs.oracle.com/javase/tutorial/java/nutsandbolts/variables.html
You may also occasionally see the term "member" used as well. A type's fields, methods, and nested types are collectively called its members."
While defining member the tutorial uses the term type, in this context it doesn't look like they mean data type. I can't find a correct definition on Google. Maybe its something obvious that I'm missing?
Upvotes: 3
Views: 105
Reputation: 12196
Java has 3 types.
ReferenceType - classes, interfaces and arrays
PrimitiveType - primitives
NullType - null
These are defined in the Java Language Specification section 4.1. Any time you see an API doc or tutorial referring to a type
, this is what they are talking about.
In this particular case the tutorial is using type to refer to a ReferenceType. The definition of a class and interface (a type) will usually also define members of that type.
Upvotes: 2
Reputation: 726589
In this context "type" means "class".
In other contexts it may mean "a class or a primitive type", but since they talk about types having members, they mean specifically classes. Same goes for nested types: only classes can be nested inside other classes; all primitive types are built into the language, and cannot be nested.
Upvotes: 8