• Post Reply Bookmark Topic Watch Topic
  • New Topic

Abstract Class not overriding the methods  RSS feed

 
Shasi Sekar
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have an interface and a method inside it.
I implement this interface in an abstract class.
no error is shown telling that i need to override the method from the interface.
But when i write a non abstract class it throws an error to over ride the method from the interface.

I am not able to understand why. Can some body help me on this

Thanks in advance
 
Sebastian Janisch
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
An abstract class is not instantiable. Hence the compiler does not care whether or not you implement the interfaces' methods or not, since if you don't, the concrete subclass will have to.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!