DEV Community

Towry
Towry

Posted on

Answer: What is the difference between casting and coercing?

Type Conversion:

The word conversion refers to either implicitly or explicitly changing a value from one data type to another, e.g. a 16-bit integer to a 32-bit integer.

The word coercion is used to denote an implicit conversion.

The word cast typically refers to an explicit type conversion (as…

Top comments (0)