Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Beginning Java
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Beginning Java
vat is abstract class
kalai sundar
Ranch Hand
Posts: 69
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
can anyone explain me abt abstract class with good example?
kalai
Niyas Ahmed Sheikh
Ranch Hand
Posts: 129
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
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:
abstract class Super { abstract public void amethod(); abstract public void bmethod(); public void amethod() { ... ... } } class Sub1 extends Super { public void amethod() { .... ... } public void amethod() { .... ... } }
Niyas Ahmed Sheikh
Ranch Hand
Posts: 129
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
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.
abstract class Super { abstract public void amethod(); abstract public void bmethod(); [B]public void amethod() [/B] { ... ... } }
Steve Morrow
Ranch Hand
Posts: 657
I like...
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
can anyone explain me abt abstract class with good example?
Please read the following:
The Java� Tutorial - Writing Abstract Classes and Methods
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
usage of a class
A mock question
ABSTRACT
HttpServlet class
A question about container!
More...