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 |
What is a generic data type?
Can you extend more than one interface?
What is java oops?
What are the types of exceptions?
What are measurable parameters?
Why do we use variables?
How to declare an arraylist in java?
Are static members inherited to sub classes?
What is clipping and repainting and what is the relation between them?
What are the allowed, non-Unicode letter characters that can be used as the first character of an identifier?
What is the difference between Resultset and Rowset.
Why are lists ordered in java?