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.

Answers were Sorted based on User's Feedback



Which of the following statements are true about constructors and methods? 1)A constructor has i..

Answer / anitha

a) 1 & 2
b)2 & 3
c)1, 2 & 3
d)None of the statements are true

Is This Answer Correct ?    131 Yes 10 No

Which of the following statements are true about constructors and methods? 1)A constructor has i..

Answer / deepika

1

Is This Answer Correct ?    9 Yes 1 No

Which of the following statements are true about constructors and methods? 1)A constructor has i..

Answer / deepika

b

Is This Answer Correct ?    7 Yes 1 No

Which of the following statements are true about constructors and methods? 1)A constructor has i..

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

More Engineering AllOther Interview Questions

what size shaft is required to transmit 100 hp @1000 RPM ,if max shear stress is 10,000 PSI,angle of twist must be less than 1' /ft/shaft is made of steel.

0 Answers  


I want to test the applications installed on the client machine using the QTP installed on the server machine.But the requirement is like that client machines do not have there own CPU's they are just dummy workstations on which the applications are excesible.So where all places QTP should be insalled in theis client server architecture.How many licenses required of what type.Please explain in details .Its urgent. Thanks

0 Answers  


what is the difference between public static void main (String args[]) and static public void main(String args[]) in java?

0 Answers  


WHY SHOULD I HIRE YOU

0 Answers   Satyam,


how to configure cisco router & switches plz provide me path steps?

0 Answers   CMS,






what happens if an error occurs in constructor or destructor.

1 Answers   Microsoft,


Hi friends..cud any help to get QC 9.2 trial..i tried with HP site but did'nt got it..please help me out

0 Answers  


char *a[2]; int const *p; int *const p; struct new { int a;int b; *var[5] (struct new)} Describe the statements in the above given construct ?

0 Answers   Geometric Software,


give me some knowledge about automation on which asked on interview

0 Answers  


What are your short and long term goals?

0 Answers   Jindal,


Discuss about WAP architecture in detail.

0 Answers  


what is debugging?

0 Answers   HSBC, Wipro,


Categories
  • Civil Engineering Interview Questions Civil Engineering (5085)
  • Mechanical Engineering Interview Questions Mechanical Engineering (4451)
  • Electrical Engineering Interview Questions Electrical Engineering (16632)
  • Electronics Communications Interview Questions Electronics Communications (3918)
  • Chemical Engineering Interview Questions Chemical Engineering (1095)
  • Aeronautical Engineering Interview Questions Aeronautical Engineering (239)
  • Bio Engineering Interview Questions Bio Engineering (96)
  • Metallurgy Interview Questions Metallurgy (361)
  • Industrial Engineering Interview Questions Industrial Engineering (259)
  • Instrumentation Interview Questions Instrumentation (3014)
  • Automobile Engineering Interview Questions Automobile Engineering (332)
  • Mechatronics Engineering Interview Questions Mechatronics Engineering (97)
  • Marine Engineering Interview Questions Marine Engineering (124)
  • Power Plant Engineering Interview Questions Power Plant Engineering (172)
  • Textile Engineering Interview Questions Textile Engineering (575)
  • Production Engineering Interview Questions Production Engineering (25)
  • Satellite Systems Engineering Interview Questions Satellite Systems Engineering (106)
  • Engineering AllOther Interview Questions Engineering AllOther (1379)