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 the abstract class has default constructor?

Answer Posted / ranganathkini

A class has a constructor so that when an instance of the
class is created, the fields of the class can be setup to a
initial valid state.

Abstract classes define partial implementation of a public
contract. Which means that it may implement some of the
methods and contains partially implemented methods that are
marked abstract.

Since abstract classes can have partial implementation and
such partial implementation can include fields of the class,
a constructor becomes necessary so that those fields are
initialized to a valid default state when they are created
thru the constructor of their concrete subclasses.

Is This Answer Correct ?    12 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Where we write javascript code in html page?

1044


In which language java is written?

970


How do you pass by reference?

1046


What comes to mind when someone mentions a shallow copy in java?

1105


How do listeners work?

1028


How do you print array in java?

984


What is consumer interface?

992


What does main method?

973


Can we able to pass objects as an arguments in java?

1014


What advantage do java's layout managers provide over traditional windowing systems?

950


What methods are used in Servlet?Applet communication?

2234


Explain about java sdk?

1030


What is functional interface in java?

1040


What are the loops in java?

979


How can we break singleton in java?

962