ExamVeda
Login
Home
Interfaces and Abstract Classes
?

Given the following piece of code:
public interface Guard{
        void doYourJob();
}
abstract public class Dog implements Guard{ }

which of the following statements is correct?

Answer & Solution
Correct Answer: Option D
Let's discuss the solution. Join the discussion
Examveda
Question posted by Examveda
Community

Join the Discussion

1 Comment
Gaurabh Khugshal
Gaurabh Khugshal 8 years ago
Abstract class needs to declare one abstract method. Here interface method is by default abstract and hence the code compiles.