What is constructor?

Answer Posted / susheel kumar

A constructor is a special type of member function for
automatic initialization of an object.
when ever an object is created the constructor will be
executed automatically.
the name of constructor same as that of its class.the
constructor is declared with no return type,not even void.
constructor should be declared in the public section most
of the time.

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which keyword is used to print the text in the screen?

701


Explain how to detect the operating system on the client machine?

567


Is javascript free to install?

610


Is javascript array dynamic?

564


what difference between args.length and args.length() in command line argument?

1842






How do you disable javascript?

538


What is unobtrusive javascript?

574


How are javascript and ecma script related?

599


How typeof operator works?

649


List some of the advantages of javascript.

563


What is jscript used for?

542


How do I use javascript to password-protect my web site?

558


Explain how can you submit a form using JavaScript?

560


How to open url in a new tab in javascript?

604


What is the purpose of local variables?

528