Wrapper Class do not have no-argument constructors.
Which statements about the following code are correct?
interface House {
public default String getAddress() {
return "direccion casa";
}
}
interface Bungalow extends House {
public default String getAddress() {
return "direccion bungalow";
}
}
public class MyHouse implements Bungalow,House{
}
public class TestClass {
public static void main(String[] args) {
House c = new MyHouse();
System.out.println(c.getAddress());
}
}
viernes, 15 de julio de 2016
Suscribirse a:
Entradas (Atom)