Programming MisconceptionsHomeMisconceptionsConceptsLanguagesTextbooksContributorsAbout
HomeConcepts
Subtyping

Subtyping

A value of a subtype can be substituted for a value of a supertype.

Related concepts:  TypePolymorphismInheritance

Closest Wikipedia entry:  Subtyping

Misconceptions about Subtyping
11 documented Misconceptions

Any LanguageJavaJavaScriptPythonScratch
Check Yourself
Misconception
CallNotStaticallyChecked
A method invocation on a reference of a type that does not have that method won't compile
Misconception
ConcreteClassOnlyImplementClassAbstract
A concrete class only needs to implement those abstract methods it inherits from abstract superclasses
Misconception
ConcreteClassOnlyImplementDirectAbstract
A concrete class only needs to implement abstract methods declared in its direct supertypes
Misconception
ConcreteClassOnlyImplementInterfaceAbstract
A concrete class only needs to implement those abstract methods it inherits from interfaces
Misconception
ExceptionRoot
Exception is the top-most exception class
Misconception
InterfaceExtendClass
An interface can extend a class
Misconception
MultipleSuperclasses
A class can have multiple superclasses
Misconception
RuntimeExceptionChecked
RuntimeExceptions are checked exceptions
Misconception
StaticDispatch
The method to be called is determined by the static type
Misconception
SubtypeCompatibleWithSupertype
A variable of a subtype can reference an object of a supertype
Misconception
SupertypeIncompatibleWithSubtype
A variable of a supertype cannot reference an object of a subtype

Find Misconceptions by...

Concept
Programming Language
Notional Machine
Textbook

About

About This Site
Structure and Content of the Inventory
Contributors