Class
A class is a blueprint for objects and defines a type with fields and methods.
Related concepts: ObjectFieldMethodMemberTypePrototype
Closest Wikipedia entry: Class (computer programming) — In object-oriented programming, a class defines the shared aspects of objects created from the class. The capabilities of a class differ between programming languages, but generally the shared aspects consist of state (variables) and behavior (methods) that are each either associated with an particular object or with all objects of that class. Object state can differ between each instance of the class whereas the class state is shared by all of them.
Misconceptions about Class28 documented Misconceptions
Check YourselfAbstractClassMustImplementAbstractMethod — Java
An abstract class must implement all abstract methods defined in its superclassAbstractClassNoImplementation — Java
An abstract class cannot contain implemented methodsAddMemberAtRuntime — Java
Set of class members can change at runtimeAllClassesHaveDefaultConstructor — Java
All classes automatically get a no-argument constructorAnyClassException — Java
Any class can be an exception classArrayListIsArray — Java
ArrayLists are arraysCallNotStaticallyChecked — Java
A method invocation on a reference of a type that does not have that method won't compileClassDefinesType — JavaScript
The type of an object is equivalent to the type defined by its class definitionConcreteClassMustOverride — Java
A concrete class needs to implement all methods declared in its abstract superclassesConcreteClassOnlyImplementClassAbstract — Java
A concrete class only needs to implement those abstract methods it inherits from abstract superclassesConcreteClassOnlyImplementDirectAbstract — Java
A concrete class only needs to implement abstract methods declared in its direct supertypesConcreteClassOnlyImplementInterfaceAbstract — Java
A concrete class only needs to implement those abstract methods it inherits from interfacesImmutableRequiresFinalParameters — Java
Immutable classes need final constructor/method parametersImplicitInterfaceImplementation — Java
Java implicitly produces implementations of any methods a class inherits from the interfaces it implementsInterfaceExtendClass — Java
An interface can extend a classMethodAsField — Java
Each object contains its own special fields for all of its methodsMethodsWithoutClass — Java
Methods can be defined outside a classMultipleSuperclasses — Java
A class can have multiple superclassesNestedObjectsImplyNestedClasses — Java
If objects are part of a containment hierarchy, their classes are nested, tooNoFieldInheritance — Java
An object contains only the fields declared in its classNoMethodInheritance — Java
Subclasses inherit fields but not methodsPrivateFieldsImplyImmutability — Java
A class where all fields are private is immutablePrototypesAreClasses — JavaScript
JavaScript is based on a class-based object modelReferringToRecursiveStructureMakesRecursive — Java
A class referring to a recursive data structure is (indirectly) part of that recursion as wellSetterIsStatic — Java
Setter methods are staticSuperclassObjectAllocated — Java
When instantiating an object of a subclass, an object of a superclass is also allocatedUnqualifiedNamesMustDiffer — Java
The unqualified names of different classes must be differentUseOfSelfTypeImpliesRecursiveType — Java
If a class has a method that has a local variable, parameter, or return value with the class as its type, the class is a recursive type