What is constructor?



What is constructor? ..

Answer / 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

More JavaScript Interview Questions

Is java is a fully object object oriented language?

2 Answers  


How to replace all occurrences of a string in JavaScript?

0 Answers  


what is syntax of wapper class

1 Answers  


Why would you use a sticky session?

0 Answers  


What does break and continue statements do in javascript?

0 Answers  


How do you create array in javascript?

0 Answers  


Is javascript event driven?

0 Answers  


What exactly does javascript do?

0 Answers  


What is a javascript symbol?

0 Answers  


What will happen if an infinite while loop is run in Javascript?

0 Answers  


Difference between '=', '==' and '===' operators?

0 Answers  


How Can I get facebook fans/likes?

0 Answers  


Categories