Field

A field is a variable that is a member of a class and may be part of an object.

Related concepts:  VariableMemberClassObject

Closest Wikipedia entry:  Field (computer science) — In data hierarchy, a field (data field) is a variable in a record. A record, also known as a data structure, allows logically related data to be identified by a single name. Identifying related data as a single group is central to the construction of understandable computer programs.

Authoritative Definition

Wikipedia does not necessarily offer the best fitting definition of a concept. The exact meaning we attribute to the concept of Field is based on principled authoritative sources such as:

Misconceptions about Field
21 documented Misconceptions

Check Yourself
Misconception
AccessingInexistentPropertyErrorJavaScript
Accessing a non existent property on an object produces an error
Misconception
AddMemberAtRuntimeJava
Set of class members can change at runtime
Misconception
ArrayHasLengthMethodJava
To get the length of an array, one needs to call its length method
Misconception
CannotChainAttributeToObjectInstantiationPython
Method calls, and attribute accesses in general, cannot be chained to a constructor invocation.
Misconception
CannotChainMemberAccessesJava
Member accesses cannot be chained together
Misconception
CannotChainMemberToConstructorJava
Method calls or field accesses cannot be chained to a constructor invocation
Misconception
ConstructorParameterIsFieldJava
Formal constructor parameters are equivalent to instance variables
Misconception
IdentifierAsStringInBracketNotationJavaScript
An identifier used to access a property with the bracket notation is treated as a string
Misconception
MethodAsFieldJava
Each object contains its own special fields for all of its methods
Misconception
MustInitializeFieldInConstructorJava
Constructors must assign values to all fields
Misconception
NoBracketNotationForObjectsJavaScript
Square brackets cannot be used to access properties of an object
Misconception
NoFieldInheritanceJava
An object contains only the fields declared in its class
Misconception
NoFieldlessObjectsJava
Objects without instance variables can't exist
Misconception
NoMethodInheritanceJava
Subclasses inherit fields but not methods
Misconception
PrivateAccessibleInSubclassJava
Private members of a superclass are accessible from a subclass
Misconception
PrivateFieldsImplyImmutabilityJava
A class where all fields are private is immutable
Misconception
PrivateMeansFinalJava
A private field cannot be changed
Misconception
RightToLeftChainingJava
Chained accesses are invoked from right to left
Misconception
RightToLeftChainingPython
Chained accesses are invoked from right to left
Misconception
StringLengthFieldJava
One can know the length of a String object by accessing its length field
Misconception
ThisAsFieldJava
this is a special field in the object

Stay up-to-date

Follow us on  twitter to hear about new misconceptions.