+ 2
What is the Exact Difference between Method and Function of Programming???
Both Contain Parenthesis.... I get Confused 😰😩😭
3 ответов
+ 7
Both are same, but when you are talking about a function inside a class it's called method .
for example we say Math class have many methods like pow(), sqrt() etc
+ 7
Function and methods are both identical but method is called by an object and defined in a class where as a function is independent,
0
Another way of looking at it is that you can write a function to create your own method