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 a generic data type?

0 Answers  


Can you extend more than one interface?

9 Answers  


What is java oops?

0 Answers  


What are the types of exceptions?

0 Answers  


What are measurable parameters?

0 Answers  


Why do we use variables?

0 Answers  


How to declare an arraylist in java?

0 Answers  


Are static members inherited to sub classes?

0 Answers  


What is clipping and repainting and what is the relation between them?

1 Answers  


What are the allowed, non-Unicode letter characters that can be used as the first character of an identifier?

2 Answers  


What is the difference between Resultset and Rowset.

6 Answers   IBM, Wipro,


Why are lists ordered in java?

0 Answers  


Categories