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

Can array grow dynamically in java?

1024


What happens when you invoke a thread’s interrupt method while it is sleeping or waiting?

1020


Is there any difference between nested classes and inner classes?

1157


Where is core java used?

1051


What is the final keyword in java?

1513


Have you ever used hashtable and dictionary?

1068


How can you read an integer value from the keyword when the application is runtime in java? example?

1190


What are the types of java languages?

1034


How do you find the absolute value?

1099


What is the maximum length of a url?

1014


Can vector have duplicates in java?

990


Is int primitive data type?

986


What are methods of a class?

1079


How we can run a jar file through command prompt in java?

1013


What is the latest version of java?

1205