WHAT ARE METHODS AND HOW ARE THEY DEFINED?

Pushpendra Singh

Total Post:240

Points:1200
Posted by  Pushpendra Singh
Java 
 1647  View(s)
Ratings:
Rate this:
  1. Pushpendra Singh

    Post:240

    Points:1200
    What are methods and how are they defined?

              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.

      Modified On Mar-26-2018 05:07:50 AM

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!