0

What if, in java programming language, we said "function" instead of "method"? Any thoughts?

Method sounds a little corny to me

13th Dec 2016, 5:18 AM
Rivensky H. Allonce
Rivensky H. Allonce - avatar
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.
13th Dec 2016, 6:14 AM
Franky BrainBox
Franky BrainBox - avatar
+ 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.
13th Dec 2016, 7:08 AM
Demeth
Demeth - avatar