Answer Posted / janet
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.
| Is This Answer Correct ? | 1 Yes | 3 No |
Post New Answer View All Answers
Can we have a method name same as class name in java?
How does arraylist size increase in java?
Where to store local variables?
Write a program to check for a prime number in java?
What is array in java?
Can a class have 2 constructors?
Why java is used everywhere?
What do you mean by ordered and sorted in collections in java?
List out five keywords related to exception handling ?
What is a local, member and a class variable?
What is the purpose of a transient variable?
What is a prefix function.write down a code to compute prefix function.
What is boolean used for?
Can we inherit inner class?
What is string variable?