Discussion :: Testing sawaal
-
public abstract interface Frobnicate { public void twiddle(String s); }
Which is a correct class?
A.
public abstract class Frob implements Frobnicate { public abstract void twiddle(String s) { } }
|
B.
public abstract class Frob implements Frobnicate { }
|
C.
public class Frob extends Frobnicate { public void twiddle(Integer i) { } }
|
D.
public class Frob implements Frobnicate { public void twiddle(Integer i) { } }
|
Answer : Option B
Explanation :
B is correct, an abstract class need not implement any or all of an interface’s methods
Be The First To Comment