1.

If an expression contains double, int, float, long, then the whole expression will be promoted into which of these data types?(a) long(b) int(c) double(d) floatI got this question in unit test.The question is from Type Conversions, Promotions and Castings topic in chapter Data Types, Variables and Arrays of Java

Answer»

Correct choice is (C) double

The explanation: If any operand is double the result of an EXPRESSION is double.



Discussion

No Comment Found

Related InterviewSolutions