Home > DeveloperSection > Interviews > What are methods and how are they defined?

Posted on    October-25-2010 12:00 AM

 Java Java 
Ratings:
 1 Answer(s)
  1095  View(s)
Rate this:

Pushpendra Singh

Total Post:241

Points:1205
Posted on    November-08-2010 1:00 AM

          Methods are functions that operate on instances of classes in which they are defined. Objects can communicate with each other using methods and can call methods in other classes. Method definition has four parts. They are name of the method, type of object or primitive type the method returns, a list of parameters and the body of the method. A method’s signature is a combination of the first three parts mentioned above.


Don't want to miss updates? Please click the below button!

Follow MindStick