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 |
1.orders for a computer are summarized by the additional features and are requested as follows; Proportion of order No features 0.3 One feature only 0.5 More than one feature 0.2 find; 1. what is the probability that an order requests at least one feature? 2. what is the probability that an order does not request more than one feature?
1 1 2 1 2 3 1 2 3 4 1 2 3 4 5 how to print this using while statement??
I am pavani pursuing 4th B.Tech final semester i want to write the Group 2 Examination , Eligibility of that exam is all degree holders but to hold my Degree 3months are more. but the exam held on 3rd July 2012. i would be complete my B.Tech when exam to be held. so am i eligible to Group2 exam or not , please clarify my doubt.
As you achieve greater success with the company after some years, Will you like to be a shareholder in our company?
successful command to make linux system as router in redhat-+
There are prime factors of two numbers a and b , write a program using this prime factors whether a is divisible by b?
how strcpy usingrecursive function
What is the use of Thumb instructions in ARM processor ?
anybody, Please send me the NIC(scientific officer/programmer) model questions papers to this mail id:imtiyazahamed14@gmail.com
what is active dirctory?
What will be the sql query to list the employee names those are getting 3rd highest salary ?
explain inflation ,deprication ,time of value & pf tariff
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)