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

What is exception propagation?

0 Answers  


What is valid keyword in java?

0 Answers  


Is there is any error if you have multiple main methods in the same class?

10 Answers   Infosys, Wipro,


What is stringjoiner ?

0 Answers  


What is time complexity java?

0 Answers  


Differentiate between nested and inner class in java.

0 Answers   Akamai Technologies,


What is meant by class loader? How many types are there?

0 Answers  


String class is defined under which package in java?

0 Answers  


How does abstract modifier work?

1 Answers   Wipro,


explain the concept of inheritance with an example?

9 Answers   Polaris,


How do you compare two strings? any predefined method for this?

3 Answers  


os is developed in c no java is more secured then c na why dont the os developed is developed using java

1 Answers  


Categories