Answer Posted / onkdurga
constructor is a special type of member function,which has
the class name as function name.constructors doesn't have
any return type even void.constucter can be called
automatically at the time of object creation.Generally it
is used for initializing values to the data members.
constructorsare2types:1.default/parameterless
constructor
2.parametarized constructor
*costructor can not be inherited
*constructor can not be declared as static
*constructor can not be accessed outside of the class when
it is specified as private.
Is This Answer Correct ? | 13 Yes | 2 No |
Post New Answer View All Answers
What is difference between string and stringbuffer?
Can you extend main method in java?
What is the common usage of serialization?
Why java is made?
Is java a virus?
Define linked list and its features with signature?
Is special character in java?
What does replaceall do in java?
What do you mean by constructor?
How many ways can we create singleton class?
What is an example of a conditional statement?
What is the latest java version?
What should I import for arraylist in java?
Explain the difference between runnable and callable interface in java?
What are the major advantages of internal iteration over external iteration?