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 a constructor overloading in java?
What are basic keywords?
What is the reflection?
What is multithreading and its advantages?
What is string [] java?
Where we write javascript code in html page?
What is stack explain?
Difference between final and effectively final ?
Explain the significance of class loaders in bootstrap?
Which non-unicode letter characters may be used as the first character of an identifier?
How many arguments can be passed to main ()?
What is indexof in java?
What do you mean by mnemonics?
How would you use Bubble Sort to sort the number of elements?
What is a text string?