Home / General Knowledge / Testing sawaal :: Discussion

Discussion :: Testing sawaal

  1. public abstract interface Frobnicate { public void twiddle(String s); } 

    Which is a correct class?

  2. 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) { } }

    View Answer

    Workspace

    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