Answer Posted / 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 |
Post New Answer View All Answers
i wanted to know about questions about c,c++ , which is required for placements.... im a fresher
What is the stl, standard template library?
Is stl open source?
what is template and type convertion
What is a stl vector?
What is a standard template library (stl)?
Describe how to safeguard a system through acquisition of an antivirus Program and systematic backup.
How do you convert stl to steps?
How connect plc and pc through software
sir please send me bpcl previous question papers
What are the different types of stl containers?
What are the symptoms of stl?
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.
how can u do connectivity in c++ language? plz send me connectivity code in c++ ?
What is stl in oop?