+ 1

What is method

30th Aug 2017, 6:37 PM
gaurang gupta
gaurang gupta - avatar
3 Answers
+ 4
It's something that performs a particular function. For example, lets say I don't want to always type out a simple 'sum' statement on my data. I could create a method that handles it for me and returns the result I'm seeking. public int sumItUp(int x, int y) { return x + y; }
30th Aug 2017, 6:48 PM
AgentSmith
+ 2
It is nothing but function .It is a part of program which can perform certain task and can be called anywhere in program anytime. during program.
30th Aug 2017, 6:55 PM
subham sahu
subham sahu - avatar
0
its nice
30th Aug 2017, 6:56 PM
gaurang gupta
gaurang gupta - avatar