Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Explain momentum?

1002


If you had a cylinder, sealed at both ends, with the pressure rising inside, would it blow at the end or split along the side first?

2247


i want to know ,If a five-digit number is input through the keyboard, write a program to calculate the sum of its digits.

2219


Box 1 cotain odd value X or Y the box 2 =X i.e 7 or 12 box 3= Y has value 19 if X is 7 or 31 if x is 12 get even value X or Y Use any operator steps allowed 3.

2950


when air is supplied from larger diameter pipe with some pressure if change diameter to small pipe the pressure increases or not? also what is increased pressureor velocity?

1743


Why it is a preferable option in parallelextender development ?

1924


how to delete four out of five duplicate records in a table using sql

1936


What is the use of generics? when was it added to jdk?

2043


Hello friend I am Manish from delhi I clear the written exam of NIC(national insurance company),If any one have any idea about inerview plz send me details my no:-9999026117,Email id:-bittu523@yahoo.com

1986


what is the program to find out the smallest word in a sentence? like if the sentence is : this is my room. then out put will be : is

1714


hello sir,pls fdorward previous group-I exam papers .....

1894


what is the need of constractor explain with sutable progarmming example

1974


Write a test case plan for a typical banking application which involves functionalities like Balance enquiry, deposit, fund transfer etc. Make your assumptions and mention the same in your answer sheet.

2298


to acheve the IP 65 protection class does it is mandatory to apply silicon grease?

1855


Why DG Set manufacturers do not give options for alternative fuels. They even do not allow to change at the cost of custmers.

1806