✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
Dadas las siguientes clases:
abstract class GrupoA {
int a = 2;
int f () {
return a;
}
}
class GrupoB extends GrupoA {
int a = 3;
int f () {
return a;
}
}
class GrupoC extends GrupoB {
int a = 4;
}
class Grupos {
static int zorg (GrupoA x) {
System.out.print(x.a + "-");
return x.f()*10 + x.a;
}
public static void main (String[] args) {
GrupoC gc = new GrupoC();
System.out.print(gc.a + "-");
System.out.print(zorg(gc));
}
}
Indica lo que se muestra en la consola al ejecutar el main() de Grupos:
Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!