Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
292 B
31
Indexable
Never
public class Main {
    public static void main(String[] args) {
        System.out.println(new B().getX());
    }

    static class A {

        int x = 1;

        int getX() {
            return x;
        }
    }

    static class B extends A {
        int x = 2;
    }
}