What will be the output of the following program?
Correct Answer : B
main a variable
i is declared which is of type
int. So the value that
i can hold is any integer value. But
i is assigned to
34.0 which is of type floating point. This leads to mismatch of type. So compilation error occurs.
Topic: Modulus Operator In Java