July 18, 2009 at 4:55 PM
Difference between Method and Function
The methods implicitly contain a reference to the object it's being invoked on, and thus will have immediate access to all of the objects fields while a function will only have immediate access to a types global and constant.
The methods should be declared and defined within the class only. So it has access controlling mechanism while function should be declared outside the class.
A class is loaded int the memory during runtime.