0

what's the difference between Method and Function calls?

27th Jul 2017, 9:49 AM
Abdur Rahman
Abdur Rahman - avatar
3 Answers
+ 2
The main difference between a function and a method in any OO language is that, a method is always called using the object of that class in which the method is written. Say for example Class A contains Method B . . to call Method B you require the object of Class A.  While function are those which you can call without creating objects. 
27th Jul 2017, 9:59 AM
Ashwaghosh Sadanshiv
Ashwaghosh Sadanshiv - avatar
0
got bddy, thnks
27th Jul 2017, 10:02 AM
Abdur Rahman
Abdur Rahman - avatar
0
can u explain in more detail that how to call function with any example
27th Jul 2017, 1:53 PM
Mayur bode