Question 1-8

Consider the following Java program.

static class Test {
    static int a = 1;

    int f() {
        return a;
    }

    int main() {
        int a = 2;
        System.out.println(f());
    }
}

Solution

Back to Review for Quiz 1