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

Explain, why the constructor is required in implemented
class?

Answer Posted / vimalan

constructor is used for initializing the class
variables.if constructor is not there,variables might be
taken the garbage values.To avoid garbage
values ,constructor is used.

Example:
Java:
int i;

initial value i=0;

C:
int v;
v=8823

Is This Answer Correct ?    6 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the method in java?

1106


Can you explain inner class.

1090


What is rule of accessibility in java?

1029


What are passing parameters?

1093


How do you find the maximum number from an array without comparing and sorting?

1123


What are the differences between Java 1.0 and Java 2.0?

2280


what is the difference between the methods sleep() and wait()? : Java thread

976


What is yield () in java?

888


What is the instance of an object?

1196


Can we clone singleton object?

1066


Can you instantiate the math class in Java?

1093


What is literal example?

952


Can a constructor be protected?

1090


What does flagged out mean?

1061


Should a main method be compulsorily declared in all java classes?

1070