• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

vat is abstract class

 
kalai sundar
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can anyone explain me abt abstract class with good example?



kalai
 
Niyas Ahmed Sheikh
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Abstract class is a class will have abstract methods and non-abstarct methods may also.

If you want to use abstart methods, then the class should also be abstract.

Generally abstract methods will have declaration part only. It must be implemented by the subclass which extends it.

Ex:

 
Niyas Ahmed Sheikh
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry, in the last post I typed mistakenly. I bolded that one. It should be public void methodname(). Any method name, but not already used in the abstarct class.

 
Steve Morrow
Ranch Hand
Posts: 657
Clojure Spring VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can anyone explain me abt abstract class with good example?

Please read the following: The Java� Tutorial - Writing Abstract Classes and Methods
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic