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 — Object-oriented programming (OOP) is a programming paradigm based on the concept of "objects", which can contain data and code: data in the form of fields (often known as attributes or properties), and code, in the form of procedures (often known as methods). A feature of objects is that an object's own procedures can access and often modify the data fields of itself (objects have a notion of this or self). In OOP, computer programs are designed by making them out of objects that interact with one another.

Authoritative Definition

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

Misconceptions about Object
31 documented Misconceptions

Check Yourself
Misconception
AccessingInexistentPropertyErrorJavaScript
Accessing a non existent property on an object produces an error
Misconception
AssignmentCopiesObjectJava
Assignment copies the object
Misconception
AssignmentCopiesObjectJavaScript
Assignment copies the object
Misconception
BoxedNullJava
Passing null to a wrapper class constructor creates an object representing the absence of a value
Misconception
ChainedMethodsNotCalledFromOutsideJava
Chained methods are all called on the object at the beginning of the chain
Misconception
EqualityOperatorComparesObjectsValuesJava
o==p compares the objects referred to by variables o and p
Misconception
EqualityOperatorComparesObjectsValuesJavaScript
The equality operator compares two objects' values
Misconception
EqualsComparesReferencesJava
o.equals(p) compares the references stored in the variables o and p
Misconception
FrameIsClassInstanceJava
A stack frame is the same as an instance of a class
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
MultiReferenceVariableJava
A reference variable can point to multiple objects
Misconception
NestedObjectsImplyNestedClassesJava
If objects are part of a containment hierarchy, their classes are nested, too
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
NoGlobalObjectJavaScript
There isn't a global object
Misconception
NoInsideMethodCallInConstructorJava
It is foirbidden to call other methods on the same object while inside its constructor
Misconception
NullIsObjectJava
null is an object
Misconception
NullIsObjectJavaScript
null is an object
Misconception
ObjectAsParameterIsCopiedJavaScript
Objects are passed by value
Misconception
ObjectLabeledWithConstructorSignatureJava
In stack and heap diagrams, an object on the heap is labeled like a stack frame of a constructor call
Misconception
ObjectLabeledWithVariableNameJava
In stack and heap diagrams, an object on the heap is labeled with the name of the variable that refers to it
Misconception
PrimitiveIsObjectJava
Primitive values are heap objects
Misconception
ReferenceLabeledWithDynamicTypeJava
In stack and heap diagrams, reference variables are labeled with the types of the objects they refer to
Misconception
SuperclassObjectAllocatedJava
When instantiating an object of a subclass, an object of a superclass is also allocated
Misconception
ThisAsFieldJava
this is a special field in the object
Misconception
ThisAssignableJava
One can assign to this
Misconception
ThisAssignableJavaScript
One can assign to this
Misconception
ThisExistsInStaticMethodJava
this is a local variable, also in static methods
Misconception
VariablesHoldObjectsJava
A variable of a reference type contains a whole object

Stay up-to-date

Follow us on  twitter to hear about new misconceptions.