Menu
Question Index
...

At what lines will there be compilation errors?

class Secret {
    private void getSecret() {
    }
    void getSecret(int i) {
        getSecret();/* LINE X */
    }
    protected void getTopSecret(String s) { /* LINE Y */
    }
}
class TopSecret extends Secret {
    void getSecret() {
        super.getSecret(); /* LINE A */
    }
    public void getSecret(int i) {
        getSecret(); /* LINE B */
        super.getSecret(i); /* LINE C */
    }
    private void getTopSecret(String s) { /* LINE D */
    }
}


X, A, D
X, Y, A, B, C, D
A, D
X, B, C

Doubts

Problems

Topic: Unknown

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App