logo

Crowdly

Browser

Add to Chrome

¿Cuál será la salida del siguiente código? class Animal {     void hacerSoni...

✅ 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 Animal {

    void hacerSonido() {

        System.out.println("Sonido genérico");

    }

}

class Perro extends Animal {

    void hacerSonido() {

        System.out.println("Ladrido");

    }

}

public class Main {

    public static void main(String[] args) {

        Animal a = new Perro();

        a.hacerSonido();

    }

}

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