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 the difference between quicksort & mergesort? When should they be used? What is their running time?
0 Answers Akamai Technologies,
Is passing by reference faster?
What is an inner class in java?
Why declare Main() inside the class in java ?
What are the disadvantages of object oriented programming?
What is the difference between multiple processes and multiple threads?
when,where and how to use abstract class and interface
What is the purpose of the strictfp keyword?
What is meant by class loader and how many types are there?
what is bmg file and how to create that files?what will it contailn?
0 Answers HCL, Probe Services,
What are the common uses of "this" keyword in java ?
Explain illegalmonitorstateexception and when it will be thrown?