ICSE Class 10 Computer Applications Question 7 of 76

Revising Basic Java Concepts — Question 11

Back to all questions
11
Question

Question 8

What is meant by implicit and explicit type conversion ?

Answer

In an implicit conversion, the result of a mixed mode expression is obtained in the higher most data type of the variables without any intervention by the user. For example:

int a = 10;
float b = 25.5f, c;
c = a + b;

In case of explicit type conversion, the data gets converted to a type as specified by the programmer. For example:

int a = 10;
double b = 25.5;
float c = (float)(a + b);