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 constructor should be used in class,if there is no
constructor what will happen?

Answer Posted / yamini

Constructor is used initialize certian paramameters to each
object on their creation.We can also overload
constructors.So we can initialize objects with diff params.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain about class in java?

1043


What is the purpose of a default constructor?

1033


What is the difference between integer parseint and integer valueof?

962


Are global variables initialized to zero?

907


How to instantiate static nested classes in java?

1009


What is the difference between Grid and Gridbaglayout?

1136


Can you extend singleton class?

1034


What are recursive functions? Give some examples?

1119


What does this () mean in constructor chaining concept?

1053


How can we break singleton in java?

901


What are the features of junit?

995


What is externalizable interface?

1053


What are different types of control structures?

917


What is space character in java?

1036


Explain the difference between extends thread vs implements runnable in java?

1058