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 use of parseint in java?

968


What is the difference between logical data independence and physical data independence?

984


How to invoke external process in java.

1024


Differentiate between the constructors and methods in java?

895


What is an argument in java?

896


How do you reverse sort in java?

900


What is the differences between c++ and java? Explain

998


Can we sort set in java?

909


What is a "pure virtual" member function?

1042


How many types of array are there?

957


What does this () mean in constructor chaining concept?

1059


What is unsigned char?

1013


What is the new line character?

1109


What is the use of optional ?

984


How do you compare two objects?

879