Answer Posted / sowjanya
constructor is special method with the basic initialization
information of the class variables.this constructor is
accessed at the time of object creation .from this object is
created with initial assignment values of variables. and we
can't call constructor separately.
if you have more than one constructor default constructor is
invoked at the object creation time and we can call other
constructor as we need .
constructor name is same as class name this is way to
identify methods is constructor.
methods are not invoked not default we call that as we
need.method name is not a class name.
Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What is the difference between the boolean & operator and the && operator?
can anyone tell me what kind of questions are asked for core java exam in aptech
differences between iterator and spliterator in java se 8?
Explain working of java virtual machine (jvm)?
Are there tuples in java?
Can the main method be overloaded?
What do you understand by downcasting?
Are jvm’s platform independent?
explain isalive() method under thread class?
What is custom tag in java?
Why is class forname used in java?
How do I enable java in google chrome?
What is java persistence api used for?
What about products that claim to block java applets at a firewall? : java security
What if I do not provide the string array as the argument to the method?