الرجوع
تسجيل الدخول

What is the output of the following Java code snippet?

public class Test {
    static int number = 5;  // Static variable accessible throughout the class

    public static void main(String[] args) {
        int number = 10;  // Local variable in main method
        System.out.println(number);
        System.out.println(Test.number);
    }
}