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

Can we have multiple public classes in a java source file?

0 Answers  


How does class forname work in java?

0 Answers  


What is a condition in programming?

0 Answers  


What is difference between equals and hashcode method?

0 Answers  


How to sort array in descending order in java?

0 Answers  


Need to use public,static keywords in main function?

5 Answers  


Can I extend singleton class in java?

0 Answers  


what is aberivation of java?

14 Answers  


how does multithreading take place on a computer with a single cpu? : Java thread

0 Answers  


Why volatile is used in java?

0 Answers  


Give an example of call be reference significance.

0 Answers   Agilent,


Why is String immutable?

0 Answers   Atos Origin,


Categories