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
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 |
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 |
one fuse has following data 80A 415V -6.9W HN SIZE 00 100 KA gG Please tell me about what is the mean of 100kA gG
how to connect oracle with java ? Give detail explanation.
what is networking
what are the various technique used for inter process communication?
i have applied for junior engg. signal II please send me questions papers for it
is the used fire extinguisher fall under Hazardous waste material?
What is the filters function?
which is having more efficiency smaller power plant or bigger power plant? why?
can i learn ad. java without learned core java? java is best or .net is best for summer training?
many people believe that only way in which the order of magnitude and improvements in software quality and productivity will be achieved is through component based development.Is this statement true or false?
why is the scheduling decision needs to be taken when a process switches from running to waiting state.also,if this is because the next process is to be allocated to cpu then why not a scheduling decision taken when a process switches from ready to running state.
hfirst prime minester of india
Civil Engineering (5086)
Mechanical Engineering (4456)
Electrical Engineering (16639)
Electronics Communications (3918)
Chemical Engineering (1095)
Aeronautical Engineering (239)
Bio Engineering (96)
Metallurgy (361)
Industrial Engineering (259)
Instrumentation (3014)
Automobile Engineering (332)
Mechatronics Engineering (97)
Marine Engineering (124)
Power Plant Engineering (172)
Textile Engineering (575)
Production Engineering (25)
Satellite Systems Engineering (106)
Engineering AllOther (1379)