Object
An object is an instance of a class stored in a set of memory locations.
Related concepts: ClassTypeValue
Closest Wikipedia entry: Object-oriented programming
Misconceptions about Object32 documented Misconceptions
Check YourselfAssignmentCopiesObject
Assignment copies the object
ChainedMethodsNotCalledFromOutside
Chained methods are all called on the object at the beginning of the chain
EqualityOperatorComparesObjectsValues
o==p compares the objects referred to by variables o and p
EqualsComparesReferences
o.equals(p) compares the references stored in the variables o and p
FrameIsClassInstance
A stack frame is the same as an instance of a class
MethodAsField
Each object contains its own special fields for all of its methods
MultiReferenceVariable
A reference variable can point to multiple objects
NestedObjectsImplyNestedClasses
If objects are part of a containment hierarchy, their classes are nested, too
NoFieldInheritance
An object contains only the fields declared in its class
NoFieldlessObjects
Objects without instance variables can't exist
NoInsideMethodCallInConstructor
It is foirbidden to call other methods on the same object while inside its constructor
NullIsObject
null is an object
PrimitiveIsObject
Primitive values are heap objects
SuperclassObjectAllocated
When instantiating an object of a subclass, an object of a superclass is also allocated
ThisAsField
this is a special field in the object
ThisAssignable
One can assign to this
ThisExistsInStaticMethod
this is a local variable, also in static methods
VariablesHoldObjects
A variable of a reference type contains a whole object