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

how can i use a nonsynchronized hashtable?

2626


How do you detect memory leaks?

1114


How many ways can you break a singleton class in java?

1029


Explain about version control?

1096


What is string :: npos?

1178


What is the private method modifier?

1142


What is the difference between state-based unit testing and interaction-based unit testing?

989


Is a case study a method or methodology?

951


How do you compare two objects?

990


What is variable and example?

1023


Can we have multiple classes in a single file?

1024


Can we define private and protected modifiers for the members in interfaces?

1153


Why singleton class is used in java?

1197


What is run time allocation?

1077


How would you convert bytes to string?

1053