الرجوع
تسجيل الدخول
أنت تتصفح نسخة مؤرشفة من الموقع اضغط للانتقال إلى الموقع الجديد بكامل المزايا

What will be the output of the following code snippet that demonstrates shadowing with instance and local variables?

public class NumberTest {
    int number = 99;

    void test() {
        int number = 100;
        System.out.println(number);
        System.out.println(this.number);
    }

    public static void main(String[] args) {
        new NumberTest().test();
    }
}