What is Constructor
Answers were Sorted based on User's Feedback
Answer / biswajit rout
Constructor is a special type of member function which
never returns any value.It is mainlly used for
initilazation of data member(s).It can only invoked by the
creation of the object of the respective class.constructor
can very well use AccessSpecifier.
constructor can very well overloaded but it can not be
overridden.
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / dipankar gain
constructor is just like a method(a function in C/C++) which
is called before the object of the class is created.
Generally you dont need to give the constructor in the class
definition but if you want to do something like initializing
variables, starting a connection, connect to the database,
then you should use the constructors.
If you dont include the constructor in your class, then the
java compiler puts it for you, its called the default
constructor.
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / ada
Constructor creates an object and initializes it. It also
creates vtable for virtual functions. It's different from
other methods in a class.
| Is This Answer Correct ? | 17 Yes | 22 No |
Answer / raj
contructor is construct which is construct
something................
| Is This Answer Correct ? | 6 Yes | 16 No |
what are you now programming Languages C+
#define CUBE(x) (x*x*x) main() { int a,b=3; a=cube(b++); printf("%d %d",a,b); } What should be the value of a and b? My calc a=4 but syst a=6 how pls tell me if you know it?
how to swap two numbers in a linked list without exchanging the data but only the links?
What is the disadvantage of templates ?
what is the difference between thread and process
write a program to demonstrate,how constructor and deconstructor work under multilevel inheritance
HOW TO GET "H1B" -VISA 4 USA FOR MY SON?HE HAD COMPLETED "MS"(IT)FROM AUSTALIA 2007.I AM WORKING IN U.S.A.
What is the stl, standard template library?
how to get the sum of two integers?
Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the total number of disk writes by MySQL.
write a piece of c++ code which allocate memory to the 50 object of type CObj
What is Template Specialization?