class MyClass { public static void main(String s[]) { int i = 34.0; int j = 7;
int k = i % j;
System.out.println("k = " + k );
} }
k = 4
The program does not compile.
k = 6
k = 0
Correct Answer : B
Inside 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.