Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

2
  • Should your first two examples have 'abstract' keyword to it? Commented Dec 24, 2018 at 10:43
  • 1
    @sofs1 Methods declared in interfaces are by default both public and abstract. You have to use abstract keyword in case of methods in abstract class. However it is fine to use abstract keyword for methods in interface also. They have permitted it for compatibility of older java version but it is discouraged. Commented Jan 2, 2019 at 5:15