+ 1

what is method?

16th Nov 2016, 6:29 AM
Atikur Rahman
Atikur Rahman - avatar
2 Respostas
+ 3
method is a collection of statements to perform an operations. we use methods to divide code to small chunks. benefits of that is the methods makes the code is easy to follow and easy to debugging by sperate the code. Other benefit of the method that we can reuse the code. becase the method write once and we can use it many times. hopefully what I said is useful
16th Nov 2016, 7:42 AM
whbe
whbe - avatar
+ 1
Method is a function inside class. class A{ public int method() { //... some code... } } int function() { //... some code... }
16th Nov 2016, 7:15 AM
Vladimir Honcharenko
Vladimir Honcharenko - avatar