Multiple choice technology testing

What is the output???

float a =10.0;  
float b = 2.5; 
float c = a/b;  
System.out.println(c);

  1. 4.0

  2. 4

  3. runtime exception

  4. none of the above

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

The output is 4.0, not 4.0. When Java divides two float values, it returns a float result. 10.0 divided by 2.5 equals 4.0, which is a floating-point value with decimal representation, not an integer.