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...

What is the difference between constructor and method?

Answer Posted / sameer inamdar

Constructor must have the same as the class name,
whereas we can give any name to the method.
Constructor doesnt have any return type not even void,
whereas method must have valid return type or void if
nothing is return.
Constructor will implicitely invoke at the time of
object creation, whereas method must invoke explicitely
with the object.

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why map is used in java?

1035


What is the use of volatile in java?

1059


What is * argv?

1238


What are the differences between heap and stack memory?

1088


Explain the difference between abstract class and interface in java?

983


Is arraylist dynamic in java?

993


How to change value in arraylist java?

1179


What is array sorting in java?

1060


Will the jvm load the package twice at runtime?

1100


How many ways can you break a singleton class in java?

984


How is string stored in java?

1060


List the interfaces which extends collection interface?

950


What is a final class in java?

1020


How are multiple inheritances done in Java?

1144


Can I learn java in 3 months?

1023