Computer Applications

Define 'Coercion' with reference to type conversion.

Values & Data Types Java

134 Likes

Answer

In a mixed-mode expression, the process of promoting a data type into its higher most data type available in the expression without any intervention by the user is known as Coercion.
Example:

byte b = 42;
int i = 50000;
double result = b + i;

Answered By

86 Likes


Related Questions