Computer Applications
What is typecasting in Java? Give an example.
Java Operators
26 Likes
Answer
The process of converting a value of one data type to another data type is called typecasting. For example:
int a = 10;
double b = 25.5;
float c = (float)(a + b);
Answered By
15 Likes
Related Questions
What is type conversion? How is an implicit type conversion different from explicit type conversion?
What do you understand by type conversion?
What are precedence and associativity?
Evaluate the following expressions, if the values of the variables are a = 2, b = 3 and c = 3
i. a - (b++) * (--c)
ii. a * (++b) %c