Which of the following declarations are valid? class Base { … } interface Spec { … } class Derived extends Base implements Spec { }
Which of the following declarations are valid?
class Base
{
…
}
interface Spec
{
…
}
class Derived extends Base implements Spec
{
}
options:
| Derived object5 = new Spec(); |
| Derived object2 = new Base(); |
| Spec object4 = new Base(); |
| Spec object3 = new Derived(); |