Multiple choice technology testing

What is the output??

interface My  {
    int x=10;
}
class Test implements My  {
    public static void main(String[] s)  {
        System.out.println(My.x);
        System.out.println(x);
        x=x+10;
        System.out.println(x);
    }
};

  1. 10 10 10

  2. 10 10 20

  3. Runtime Exception

  4. Compilation error

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

Interface variables are implicitly final and static, so they cannot be modified. The line x=x+10 attempts to reassign a final variable, causing a compilation error. The code would print 10 10 before failing on the assignment.