Which of the following statements are true about
constructors and methods?
1)A constructor has it's own name, a return type and is
invoked using the new operator.
2)A function has it's own name, a return type and is invoked
using the dot operator.
3)A constructor has the name of the class, no return type
and is invoked using the new operator.
Answer Posted / prince
2 & 3 are correct answers for sure.
because,
constructor is invoked at the time of creation of the object to a class, hence it is invoked using new operator, and the name of constructor and class must be same coz, the default constructor is invoked at the time of creation of object, and lastly, constructor has no return type and it can only returns constructor ( the concept of copy constructor)
if I am wrong are any modifications needed, please plz plz plz plz inform me
| Is This Answer Correct ? | 6 Yes | 2 No |
Post New Answer View All Answers
could u please tell me where the click view tool coaching in hyderabad
Discuss about WAP architecture in detail.
What is VAT Account determination ? and how we can map in SAP ?
what type of questions pannel ask to the intervier? plz i want questions about computer engineering? System security subject.
why there is a collision in switch
explain in detail about life cycle of thread
Please tell us about an implementation that you worked on that did not go as planned. What were the challenges you faced and how did you overcome them
what is mean by oracle?And how it is used?
hi... i just want to know that how could join the AAI with an B.E back ground??? please help me out.
The old welding machine use electro- -magnetic winding to step up the current for welding rods,what is new principle inside the welding
Write a function to print all the combinations of a string both uppercase and lowercase without altering the position of each letter.
i am going to give interview for the post of ibps po..so there is a question in my mind which is "Being an electonics and communication engineer how can you help in banks, I mean whats the application of your education in banking."
what is the heat insulation material is adaptable for a flue gas duct that carries waste heat from brick kiln to brick drier and what temperature is required to maintain at the tunnel to dry adobe bricks adequately
hey..... anybody here from CG? i m from CG n have been selected in the written xam sbi(clerical).interview date is 5/5/2010. answer me if anybody is there 4m CG
how can we implement the raid techmology on linux. operating system