Card 9 / 37: abstract class X{ public abstract void methodX(); } interface Y{ public void methodY(); } Which two code fragments are valid?
A)
class Z extends X implements Y{ public void methodz(){} }
B)
abstract class Z extends X implements Y{ public void methodz(){} }
C)
class Z extends X implements Y{ public void methodX(){} }
D)
abstract class Z extends X implements Y{ }
E)
class Z extends X implements Y{ public void methodY(){} }
Answer:
B) abstract class Z extends X implements Y{ public void methodz(){} }
D) abstract class Z extends X implements Y{ }
Previous Card | ← Previous Card Button |
Next Card | → Next Card Button |
Flip Card | Space-Bar |
|