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 |
Default layout of Dialog object?
What is singleton class in ruby?
Name four container classes.
What is meant by inheritance and what are its advantages?
How to sort an array from smallest to largest java?
what are the design patterns in struts?
Give us a program to check for parenthesis matching using stack.
How do generics work in java?
how to java plateform independent?
Why java is object oriented?
can write code for serialization ?
What is the difference between Java Program Constructor and Java Program Method, What is the purpose of Java Program constructor Please Explain it Breafily?