Type

A type is a set of values supporting a certain set of operations.

Related concepts:  ValueClass

Closest Wikipedia entry:  Type system

Authoritative Definition

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

Misconceptions about Type
37 documented Misconceptions

Check Yourself
Misconception
ArrayElementTypeRepeats — Java
The type of a multi-dimensional array is written as T[] T[] T[]
Misconception
ArrayElementsUntyped — Java
Elements of arrays are untyped
Misconception
ArrayLengthPartOfType — Java
The length of an array is part of its type
Misconception
ArrayRankNotPartOfType — Java
The rank of an array is not part of its type
Misconception
CharNotNumeric — Java
Char is not a numeric type
Misconception
CompositeExpressionsUntyped — Java
Expressions that consist of multiple parts have no type
Misconception
ExpressionsDynamicallyTyped — Java
One has to evaluate an expression to determine its type
Misconception
IntegerDivisionToRational — Java
Dividing two integers can produce a rational number
Misconception
LargeIntegerLong — Java
Large integer numbers have type long
Misconception
MethodWithoutReturnType — Java
A method declaration does not need to include a return type
Misconception
NamedTypeParameter — Java
To instantiate a generic type, for each type parameter one has to specify both the name and the type
Misconception
NoCastIfSameSize — Java
If a variable is at least as big (bit-width) as a value, then no cast is needed to a assign the value to the variable
Misconception
NoFloatLiterals — Java
There are no float literals
Misconception
NoImplicitWidening — Java
Smaller types are never automatically converted into bigger ones without an explicit cast
Misconception
NoLongLiterals — Java
There are no long literals
Misconception
NumericToBooleanCoercion — Java
Numeric types can be coerced to boolean
Misconception
PrimitiveTypeParameter — Java
Type parameters of generic types can be instantiated with primitive types
Misconception
PrimitiveVariablesDynamicallyTyped — Java
The type of a primitive variable depends on its value
Misconception
RecursiveMethodImpliesRecursiveType — Java
A class with a recursive method represents part of a recursive data structure
Misconception
ReferenceToBooleanCoercion — Java
Every reference type can be coerced to boolean
Misconception
ReferenceToIntegerConversion — Java
One can cast between references and ints
Misconception
StaticCallPolymorphic — Java
A static method call is dispatched polymorphically at runtime based on the argument types
Misconception
SubtypeCompatibleWithSupertype — Java
A variable of a subtype can reference an object of a supertype
Misconception
SupertypeIncompatibleWithSubtype — Java
A variable of a supertype cannot reference an object of a subtype
Misconception
TargetTyping — Java
The type of a numerical expression depends on the type expected by the surrounding context
Misconception
UntypedVariables — Java
Variable declarations don't need a type
Misconception
UseOfSelfTypeImpliesRecursiveType — 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
Misconception
VoidMethodNotRecursive — Java
A method with void return type can't be recursive
Misconception
VoidMethodReturnsValue — Java
A method with void return type can return a value
Misconception
CharType — JavaScript
A single character is of type char
Misconception
ClassDefinesType — JavaScript
The type of an object is equivalent to the type defined by its class definition
Misconception
EqualityOperatorComparesOnlyTypes — JavaScript
The equality operator '==' compares only the types of the operands
Misconception
NullAndUndefinedAreTheSame — JavaScript
The values null and undefined are the same
Misconception
TypeofArrayIsArray — JavaScript
The typeof operator applied on an array returns 'array'
Misconception
TypeofNullIsNull — JavaScript
The value null is of type 'null'
Misconception
EqualityOperatorComparesOnlyTypes — Scratch
() = () compares only the types of its operands
Misconception
ListsHomogeneous — Scratch
All items in a list must have the same type