Right output

Report a typo

What will be the output of this code?

public class Outer {

    private int x = 8;

    void someMethod() {

        final int x = 10;

        class LocalInner {

            private void print(int x) {
                System.out.println(x);
            }
        }

        LocalInner inner = new LocalInner();
        inner.print(15);
    }

    public static void main(String[] args) {
        Outer outer = new Outer();
        outer.someMethod();
    }
}
Enter a number
___

Create a free account to access the full topic