✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
Considerando la siguiente interfaz y clase:
interface IDuplicar {
IDuplicar duplica();
}
class Numero implements IDuplicar {
int x;
public Numero(int x) {
this.x = x;
}
public Numero sumar(int otro) {
return new Numero(x + otro);
}
public IDuplicar duplica() {
return new Numero(2*x);
}
}
Marca los enunciados que son correctos entre los siguientes: