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

Write a program to input 10 elements in an array and seperate even and odd numbers, positive and negative between them ?

0 Answers  


how can read number 1 to 100,without use anyloop.

0 Answers  


I am student pursuing B.E/B.tech in Computers 8'th sem.What should i do for a better carrier.Plz suggest other than programming languages.Is the ERP a better one to do?plz help...

0 Answers  


Can any one say what is the exact meaning of Engineering.

21 Answers  


Why Ammeter is always connected in series in the circuit and Voltmeter in parallel?

14 Answers   BEL, College School Exams Tests, DRDO, Electrical Tech, UOB,






Can anyone tell me the exact formulae with explanation for the questions related to cube which is asked for CTS? I have seen varieties of formulae in different sites.I need the exact on... So pls help me out!!!

0 Answers   CTS,


what is the proper location of sample point for sphere tank?

0 Answers  


what are differences between composition and inheritance in c

0 Answers  


Why do windmills never appear stationary?

0 Answers  


Why it is a preferable option in parallelextender development ?

0 Answers  


C++ PROGRAM FOR FIBONACCI SERIES USING COPY CONSTRUCTER

0 Answers  


2 ships are wardroom light house one side at 30 degree and other ship other side at 45 degree. If light house has 100 m, find distance of boat from light house. and also find distance of each boat from light house

2 Answers   3D PLM,


Categories
  • Civil Engineering Interview Questions Civil Engineering (5084)
  • 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)