Computer Programming
Java Programming
C Programming
The Difference Between

What is the difference between a function and a method?

363738

Top Answer
User Avatar
Wiki User
Answered
2006-10-14 07:52:56
2006-10-14 07:52:56

In an Object Oriented Programming (OOP) language like Java, it is called a method. In a procedural language (like QBASIC or PHP) it is called a function. They are the same thing. Most people use them interchangeably. -DJ Craig A function returns a value and method does not return a value. A function that doesn't return a value is called (procedure / subroutine)

001
๐ŸŽƒ
0
๐Ÿคจ
0
๐Ÿ˜ฎ
0
๐Ÿ˜‚
0
User Avatar

Related Questions


Fuction and method are same . In java we call function as a method...thres no diff between them...


method= how something is done function= what something does


A function how a system functions or operates for given inputs to the system. A method is a process of producing a specific result.


A method is a function, but it's the name given to a function in an object. int Bar(void) {;} is a function int Foo::Bar(void) {;} is a method of the class Foo


functions have independent existence means they are defined outside of the class e.g. in c main() is a function while methods do not have independent existence they are always defined inside class e.g. main() in Java is called method. ######## I've been studying OOP lately and had this question myself, so I will share my thoughts; I was taught that "A Function should do 1(one) thing and do it well." In specific Regards to PHP; The difference between a Method and a Function is that a Method is tied to a specific class. Hope this helps. -------------------------------------------------------------------------------------------------------- function can return value where as method can't that is the main difference between function and method --------------------------------------------------------------------------------------------------- Actually you are describing the difference between a function and a procedure. Function returns a value, procedure does not unless you are using c#, then everything is a function. In c# a function, to paraphrase the first answer, does and thing and does it well. A method contains functions. The most important method is the Main method. All functionality of a program must be referenced in the Main method because when you run a program, it starts at the beginning of the Main method, and stops wehn it hits end of the Main method.


YOU WAIT FOR THE EGG OF THE CHICKEN AND THERE YOU GO YOU HAVE ROSTER METHOD!


A function is a piece of code that can be reused by calling its name while a method is a function that is associated with a class. In Java, functions are usually referred to as static methods.


difference between function and objectives?


A function is a method that returns a value other than void. Methods includes functions, subroutines, constructors, destructors, and properties.


A function is more difficult than a relation while a relation is more simpler than a function.


Difference between Percentage of Completion method and Completed Contract method?


What is the difference between the conventional method of dimensioning and the baseline method of dimension


what is difference between regular simplex method and dual simplex method


What is the difference between malloc() and calloc()?


fundamental difference between a polynomial function and an exponential function?



A function is a type of procedure which returns a value. A method is the name given to functions and/or subroutines in certain programming languages.


What is the difference between Modified accrual and Full accrual method?"


In object-oriented languages, a class member function is also known as a method. C does not provide native support for the object-oriented paradigm and therefore does not support methods.


Kinetic method and Endpoint method used in spectrophotometery but the slight difference betwenthem is wanted.


The difference between 'cut and paste' and what other method?



the difference is ,a structure is where it is placed and the function is what it daos


this is not the way to question me when i question you ..... and the major difference between event and method is that event starts with alphabet E and method starts with alphabet M ok.....


the differnce between a 'reserch method' and 'search model'



Copyright ยฉ 2020 Multiply Media, LLC. All Rights Reserved. The material on this site can not be reproduced, distributed, transmitted, cached or otherwise used, except with prior written permission of Multiply.