Each language has its own lexicon of terms with special meaning. In C Programming Language, the word Function means a program routine. In Java, the term Function does not have any special meaning. Whereas Method means one of the routines that forms the implementation of a class.
First let we know what is Function?
A function is a piece of reuseable code that is called by name. In C or C++ we used to say function to a reusable code. It can be passed data to operate on (arguments / parameters) and can optionally return a result. Function is a portion of code within a larger program, which performs a specific task and is relatively independent of the remaining code.
So What is Method??
A method is a piece of code that is called by name that is associated with an object. A method is almost identical to a function but it's purpose is generally to operate on the data contained within the component (class). Method is a function that is a member of a class.
If you know little bit about Function and Method, you may noticed that "Functions stand alone and methods are members of a class."
Now You can Say: Method != Function and Function != Method [ :P]
We can find another difference and that is: In C programmer used to say Function. In the same way java programmer used to say Method.
Awesome post !
ReplyDeleteAuthorized iphone service center in Chennai | iphone service center in chennai | Mobile service center in chennai | Authorized iphone service center in Chennai | iphone service center in chennai
ReplyDeleteNice information, valuable and excellent in Job, as share good stuff with good ideas and concepts, lots of great information and inspiration, both of which I need, thanks to offer such a helpful information here.
mobile phone repair in Auburn Hills
iphone repair in Auburn Hills
cell phone repair in Auburn Hills
tablet repair in Auburn Hills
ipad repair in Auburn Hills
mobile phone repair Auburn Hills
iphone repair Auburn Hills
cell phone repair Auburn Hills
phone repair Auburn Hills
tablet repair Auburn Hills
cheap hidden cameras
ismartalarm camera
dymo label maker
Waterproof Action Camera
Coleman full size air mattress
womens cotton long johns
APPLE WATCH SERIES 3 INFORMATION
Winter Cycling Jackets For Men