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 meaning of the words public, static and void?
Who is at risk in java? : java security
Are there tuples in java?
What is rxjava2?
When a thread is created and started, what is its initial state?
What is a uint8?
Explain the reason for each keyword of public static void main(string args[])?
What is default constructor in java?
Which type of stream is in java?
Can the main method be declared final?
What is stateless class in java?
What are struts java?
Define network programming?
Where is singleton design pattern used in java?
What is a stream in programming?