What is the difference between a constructor and a method?
Answer / Chandan Rai
A constructor is a special method that is used to create an object, it has the same name as the class. A constructor initializes the instance variables of the object and can perform other tasks such as setting default values. A method, on the other hand, does not have the same name as the class and can be used to perform operations on objects.
| Is This Answer Correct ? | 0 Yes | 0 No |
Explain a few methods of overloading best practices in java?
Can I declare class as static or private?
Is 0 an irrational number?
How does arraylist work in java?
State two differences between C and Java.
What is the nested interface?
why use interface? if interface declear a method implement in class. why direct implement method in class
where to use join method and explain with real time senario?and programatical explenation also..
What is thread start?
Keywords in Exceptions?
What is quick sort in java?
What is array class in java?