logo

Crowdly

class X {     int x = 5; } class Y extends X {     int x = 10; } public clas...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

class X {

    int x = 5;

}

class Y extends X {

    int x = 10;

}

public class Test {

    public static void main(String[] args) {

        X obj = new Y();

        System.out.println(obj.x);

    }

}

0%
0%
0%
100%
More questions like this

Want instant access to all verified answers on cours.cyu.fr?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!