Home > Java Programming > Interface > Questions and Answers
01. | which two are true? | |||||||||||
|
02. |
Interface writeable {} Interface Erasable{} Which three are valid?
| |||||||||||
|
03. |
Interface pet{ Void eat(); } Class dog implements pet{ Public void eat(){} } Class Beagle extends dog{ Public void eat(){} } Which of the following demonstrate theâ€program to an interface †principle? | |||||||||||
|
04. |
interface A{} Interface B{ Void b(); } Interface C{ Public void c(); } abstract class D implements A,B,C{} class E extends D{ void b(){} public void c(){} } | |||||||||||
|
05. | which is the valid definition of an interface called transportable given another valid interface moveable? | |||||||||||
|
06. |
Interface A{} Interface B{} Interface C extends A, B{} What will happen if I compile above code? | |||||||||||
|
07. |
interface moveable{ Void move(); Void stop(); } Which is valid? | |||||||||||
|
08. | which three can be included in an interface declaration? | |||||||||||
|
09. |
Can we write constructor in an interface? | |||||||||||
|