ICSE Class 10 Computer Applications
Question 10 of 76
Revising Basic Java Concepts — Question 14
Back to all questions 14
Question Question 11
What will be the resultant type of the following expression if fl is a float variable and db is a double variable?
(int) (fl + db)
The resultant data type will be int.
Explanation
Here, the programmer is performing an explicit type conversion to int using the type cast operator. Hence, the resultant data type will be int.