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...

why abstract class will have a constructor?

Answer Posted / aditya ganjiwale

Its there to be able to initialize the abstract class
internal state.
Lets say you would like to assign two variables, you would
have to do this for every implementation, but with
constructors in the abstract class you only need it once:
So every class inheriting only needs to call the
constructor, instead of assigning the values themself every
time.

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What do heavy weight components mean in java programming?

954


What is flag in java?

996


Explain about instanceof operator in java?

1061


What is thread life cycle in java?

1069


Does anyone still use java?

1119


What is a two-pass assembler?

1053


How do I remove a character from a string in java?

966


What is set in java?

1051


Can a class have multiple superclasses?

1170


What is the purpose of abstract class?

1017


What are the differences between string and stringbuffer?

1129


What is a parameter example?

981


Which class represents the socket that both the client and server use to communicate with each other?

1044


What do you mean by inner class in java?

1086


How to sort an array in java without using sort method?

881