1. public class TestFloatDouble {
2. public static void main(String[] args) {
3. float f1 = 2.0f:
4. double d1 = 4.0;
5. double result = f1 * d1;
6. System.out.println(result);
7. }
8. }
What is the output?
Answers
Answered by
0
Answer:
8.0
Explanation:
In Java, default type conversion happens in this order:
byte -> short -> int -> long -> float -> double
Similar questions