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

Is main a function?

1057


What is the map interface in java programming?

1017


what is daemon thread and which method is used to create the daemon thread? : Java thread

972


What are triggers in DB? Explain their types. How do they work?

1090


What do negative exponents mean?

1045


Is call by reference possible in java?

964


What is null statement?

1014


Is multiple inheritance supported by java?

993


What exceptions occur during serialization?

1088


What is an empirical question?

968


Can we override final method?

1011


Why is multiple inheritance not supported in java?

1031


What is an infinite loop in java? Explain with an example.

1041


Why is stringbuffer called mutable?

994


Can main() method in java can return any data?

1183