Computer Science, asked by ajaytak1169, 11 months ago

What is the difference between function and method

Answers

Answered by lalitamehtani001
0

Answer:

the difference between function and method is-

Explanation:

Function meaning tell any object function or part of the object

Method meaning tell any explanation of the object

Answered by Jaswindar9199
0

QUESTION:-

What is the difference between function and method

ANSWER:-

The Difference Between Function And Method Are:-

  • Functions do not have any reference variables whereas, Methods are called by reference variables

  • All data that is passed to a Function is explicit whereas, all data in Method is implicitly passed to the object for which it was called.

  • The Function does not have access control i.e. Function (other than static functions) proclaims and defines anywhere in the code whereas, Method has access control i.e. Method should proclaim and define in the class only.

  • The Function applies to both object-oriented and non-object-oriented language(procedural language. eg. C, Scripting language eg: JavaScript etc) whereas, Method is only applicable to an object-oriented programming language like C++, C#, Java etc.

#SPJ2

Similar questions