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 is the function of log?

946


What is abstract class constructor called?

952


What is an association?

938


What do you mean by thread safe?

924


Explain the importance of finally over return statement?

991


Is boolean a data type in java?

900


What is consumer interface?

945


How many bytes is a unicode character?

953


What is the default value of the local variables?

958


Is 0 true or false in java?

949


Find the value of a specified element of the array arr[i] where 0 <= i <= n-1

922


How does linkedlist work in java?

871


What is java virtual machine? Explain

965


What is the difference between static (class) method and instance method?

1026


What is the use of jtable?

1059