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 |
How do you create a sop?
What is the purpose of garbage collection in java? When is it used?
What 4 doubled?
How to sort a collection of custom Objects in Java?
Give the hierarchy of inputstream and outputstream classes.
What is the difference between Stream Reader and Stream Writer?
What is Recursion Function?
In Inheritance if we are implementing Multi level inheritance and all class having same name of variable and now i want to access each class variable and how it is possible?
How does arrays sort work in java?
What are the advantages of inner classes?
What is indexof?
Is ResultSet class?
5 Answers Bally Technologies, TCS,