+ 1
Method or Function
What is the difference between method and function?
3 Answers
+ 2
no difference in java we call it method.. and in c c++ and other languages it is callled as function
+ 8
Method - typically means a member function pertaining to a class or struct.
Function - typically means it does not belong to a class or struct.
What things are called really depends on the language's community. In C++ methods are called member functions more often than methods, while in languages such as Java it's more common to call them methods.
+ 1
i think in c++
Functions have return type
Method don't have return type.
in java
there just called methods whether its a function or not.