What will be indicated in the console?

public class D {
    public static void main(String[] args) {
        E e = new E();
        e.someVariable = 100;
        e.doIt(e);
        System.out.println(e.someVariable);
    }
}

class E {
    public int someVariable = 10;

    public void doIt(E aE) {
        aE.someVariable++;
    }

    E() {
    }
}

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Keep exploring
Java quizzes
Cosmo
Sign Up Now
or Subscribe for future quizzes