logo

Crowdly

Browser

Add to Chrome

¿Cuál será la salida del siguiente código? class A {     int x = 10; } c...

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

¿Cuál será la salida del siguiente código?

class A {

    int x = 10;

}

class B extends A {

    int x = 20;

    void mostrar() {

        System.out.println(super.x);

    }

}

public class Main {

    public static void main(String[] args) {

        B obj = new B();

        obj.mostrar();

    }

}

More questions like this

Want instant access to all verified answers on moodle.elpuig.xeill.net?

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

Browser

Add to Chrome