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
Why oracle type 4 driver is named as oracle thin driver?
What is war file in java?
What is reflection in java?
What is @resource annotation in java?
How do I run a java program from the command line?
Explain the encapsulation principle.
What is stateless and stateful in java?
What is log4j in java?
What is gpt and gpc? : java security
What are messages in java?
Which version of my browser should I use? : java security
Why doesn't lsdou work under windows nt? : java security
differences between iterator and spliterator in java se 8?
What is cookie in java?
Explain the inheritance principle.