0
What if, in java programming language, we said "function" instead of "method"? Any thoughts?
Method sounds a little corny to me
2 Answers
+ 1
In so many java programming books i have read, the authors do specify it clearly that you can either call it a method or function.
Bear in mind that the term method is mostly used in java programming while function is used in c++ and some other languages like javascript e.t.c
The term method or function doesnt really matter provided you know exactly what you are doing.
NB : I prefer to call it a function.
+ 1
in most of languages, there are functions and methods. they are the same, except method is a function related to a class/object.
so method == function of object in OOP.
and since every code in java starts with a 'class' statement, java MAKES you to use OOP. and if you are using OOP, your functions become methods, but they don't stop being functions nevertheless.