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.
Blog Author: Vijay Kumar
Go to: Coding Problem Solutions
No comments:
Post a Comment