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


what is default constructor and parameterised constructor
with example?



what is default constructor and parameterised constructor with example?..

Answer / tushar

Default constructor: this constructor is created by the compiler automatically whenever an object is created.User don't have to write default constructor every class has its default constructor
Parameterized constructor: this constructor is exclusively written by the coder to assign the initial value to an instance variable.By creating parameterized constructor you can overwrite the default constructor.

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More Core Java Interview Questions

Explain exception chaining in java?

0 Answers   Cyient,


Is oracle charging for java?

0 Answers  


What is the final field modifier?

0 Answers  


What is finalize()? Is finalize() similar to a destructor?

0 Answers  


Explain about method local inner classes or local inner classes in java?

0 Answers  


How could Java classes direct program messages to the system console, but error messages, say to a file?

2 Answers  


What are some characteristics of interference class?

0 Answers  


What do you understand by weak reference?

0 Answers  


How many JVMs can run on a single machine and what is the meaning of Just-In-Time (JIT) compiler?

0 Answers   TCS,


what is mean by method signature?

5 Answers   Satyam,


What is "finally" keyword?

10 Answers  


What is the difference between actual and formal parameters?

0 Answers  


Categories