Computer Applications

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)

Values & Data Types Java

8 Likes

Answer

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.

Answered By

3 Likes


Related Questions