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

Default layout of Dialog object?

1 Answers  


What is singleton class in ruby?

0 Answers  


Name four container classes.

0 Answers  


What is meant by inheritance and what are its advantages?

0 Answers  


How to sort an array from smallest to largest java?

0 Answers  


what are the design patterns in struts?

1 Answers  


Give us a program to check for parenthesis matching using stack.

0 Answers   Genpact,


How do generics work in java?

0 Answers  


how to java plateform independent?

5 Answers   TCS,


Why java is object oriented?

0 Answers  


can write code for serialization ?

1 Answers   HCL, MegaSoft,


What is the difference between Java Program Constructor and Java Program Method, What is the purpose of Java Program constructor Please Explain it Breafily?

0 Answers   PUCIT,


Categories