What is constructor and virtual function?
Answers were Sorted based on User's Feedback
Answer / raj
constructor is special member function whose purpose to
initialize the class member variables.
| Is This Answer Correct ? | 10 Yes | 0 No |
Constructor is a special kind of method used to initialize
an object.
| Is This Answer Correct ? | 11 Yes | 2 No |
Answer / lakshmi
Constructor is the function that has class name as its
function name with no return type and is used to initialize
the data members of the class.
virtual function is the function that can be overriden in
the derived class. it uses virtual keyword. it may or may
not be overloaded in derived class.
abstract function must be overridden in the derived class
inorder to create the instance.
| Is This Answer Correct ? | 4 Yes | 0 No |
Answer / ravikiran(aptech mumbai)
constructor name is of the class name which has no return
type and is used o initialize during instantiation of class.
virtual function is the function called t runtime
| Is This Answer Correct ? | 3 Yes | 2 No |
Answer / rohit saini
Contructor is the special type of method which is used
initialize the data member the class
| Is This Answer Correct ? | 1 Yes | 0 No |
while creating thread why we extend thread class
What technique can be employed to compare two strings?
How many techniques can be employed to create a string object?
Difference between concurrent hashmap and hashtable and collections
What is meant by class loader? How many types are there?
what is the difference between multitasking and multithreading?
How do you compare values in java?
Are arrays passed by reference in java?
How hashmap works in java?
Explain when classnotfoundexception will be raised ?
HOW TO PRINT A NO IN WORDS USING WHILE LOOP THE NO WILL BE PRINTED WHEN IT WILL BE IN THE RANGE BETWEEN 1 AND 3?
What are parsers? Dom vs sax parser.