Multiple choice technology programming languages

What is the output for the below code ? public interface TestInf { int i =10; } public class Test { public static void main(String... args) { TestInf.i=12; System.out.println(TestInf.i); } }

  1. Compile with error

  2. 10

  3. 12

  4. Runtime Exception

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

All variables declared inside interfaces are implicitly public, static, and final. Attempting to reassign a value to TestInf.i (TestInf.i = 12) causes a compile-time error because it is a constant.