logo

Crowdly

Browser

Add to Chrome

¿Qué imprime este código? class Empleado { double salario = 1000; ...

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

¿Qué imprime este código?

class Empleado {

double salario = 1000;

 

double calcularSalario() {

return salario;

}

}

 

class Gerente extends Empleado {

double calcularSalario() {

return salario + 500;

}

}

 

public class Test {

public static void main(String[] args) {

Empleado e = new Gerente();

System.out.println(e.calcularSalario());

}

}

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