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

How do you use parseint in java?

969


What is the difference between jdk and jre?

1040


What is the use of list in java?

969


What is tostring () method?

998


Write a program to print count of empty strings in java 8?

984


What is difference between == equals () and compareto () method?

1023


How to reverse string in java?

1178


What is entry in java?

1018


List the three steps for creating an object for a class?

950


Whats the difference between notify() and notifyall()?

1017


How do you sort an array in java?

974


What is object-oriented paradigm?

1048


what is the difference between Object Based Language and Object Oriented Language?

1019


Explain purpose of sleep() method in java?

1097


What is identifier in java?

1087