Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

what is main purpose of abstract class?

Answer Posted / amit patel

Abstract class is used to implement common behavior which is
required by all subclasses but have some behavior which is
specific to subclass.

E.g., you want to implement a DocumentViewer App. Basic
operations are like open, view and close. open and close
requires no specific implementation while view require
specific implementation. Make DocumentViewer abstract,
implement open, close and make view as abstract. Now view is
responsibility of subclass. Like PDFViewer will have own
implementation for view()

Is This Answer Correct ?    14 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are static initalizers in java ?

962


What is variable argument in java?

948


Considering notepad/ie or any other thing as process, what will happen if you start notepad or ie 3 times? Where 3 processes are started or 3 threads are started?

1100


What is exception handling in java?

978


Can you sort a string in java?

856


What is the difference between array and array list in java?

1139


Can keyword be used as identifier?

898


What is a string token?

956


what is server side caching?

2093


What is independent and dependent variables in research?

810


Write a code to create a trigger to call a stored procedure

907


What is mutable object and immutable object?

1079


What is the size of string?

1010


Can I use % with real numbers?

962


Explain 5 features introduced in jdk 1.7?

968