Explain, why the constructor is required in implemented
class?
Answer Posted / sekhar
Constructor is like a method.It can be invoked as soon as
we create an object for the class.We can overload
constructor.to call them we need pass parameters in main
method.
| Is This Answer Correct ? | 3 Yes | 3 No |
Post New Answer View All Answers
How do you compare two objects?
How to display all the prime numbers between 1 and 100
Why we override equals() method?
What is a java list?
Is double bigger than float?
Can we clone singleton object?
In multi-threading how can we ensure that a resource isn't used by multiple threads simultaneously?
How do you clear a list in java?
Compare Mutex and Semaphore in java.
Does constructor creates the object ?
Can we inherit a class with private constructor?
How can you set the applet size?
How do you convert an int to a double in java?
Explain where variables are created in memory?
What carriage return means?