answersLogoWhite

0


Best Answer

Constructor will be automatically invoked when an object is created whereas method has to be called explicitly. Constructor needs to have the same name as that of the class whereas functions need not be the same. * There is no return type given in a constructor signature (header). The value is this object itself so there is no need to indicate a return value. * There is no return statement in the body of the constructor. * The first line of a constructor must either be a call on another constructor in the same class (using this), or a call on the superclass constructor (using super). If the first line is neither of these, the compiler automatically inserts a call to the parameterless super class constructor.

User Avatar

Wiki User

15y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

17y ago

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)

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

function is a segment of code that compute a value.....and argument is a parameter that is pass in function.................

from sahil chopra

In the IF function, the first argument sets a condition for comparison, called a relative test

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

A function how a system functions or operates for given inputs to the system.

A method is a process of producing a specific result.

This answer is:
User Avatar

User Avatar

Wiki User

15y ago

A procedure is a manner of doing something; a function is the end purpose of the procedure. This is a simple way of putting it, but pretty close to the meaning of both terms.

This answer is:
User Avatar

User Avatar

Wiki User

15y ago

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

This answer is:
User Avatar

User Avatar

Wiki User

14y ago

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.

This answer is:
User Avatar

User Avatar

Wiki User

14y ago

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

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Difference between function and method
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What are the difference between roster method and rule method?

what is the difference between roster method and rule method


What is the difference between function and method in c language?

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.


What is difference between Grammar Translation Method- Direct Method and Audio Lingual Method?

differences between direct method and grammar translation?


What is the difference between constructor and friend function in c plus plus?

A constructor is a method that fires when the object is instantiated. A friend function is a function that has special access to the object. They are two different types of things, and cannot be further differenced.


What are the difference between heat method and chemical method in sanitation?

im lovin it

Related questions

What is the difference between method and function in java?

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.


What is the difference between the conventional method of dimensioning and the baseline method of dimensiong?

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


Difference between Percentage of Completion method and Completed Contract method?

Difference between Percentage of Completion method and Completed Contract method?


What is the difference between function and method?

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.


What is the difference between simplex and dual simplex method?

what is difference between regular simplex method and dual simplex method


What are the difference between roster method and rule method?

what is the difference between roster method and rule method


Example of fundamental difference between a polynomial function and an exponential function?

fundamental difference between a polynomial function and an exponential function?


What is the difference between function and method in c language?

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.


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

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


What is the difference between a wye and a ty?

A wye is a back function of the piping which carries loads of water into your home. It is a great method for smoking da ganj.


What is the difference between the endpoint method and the kinetic reaction method?

The endpoint method is used in titration to find the exact point at which the reaction is complete, often indicated by a color change. The kinetic reaction method involves monitoring the rate of reaction to determine the endpoint based on changes in the reaction rate. Both methods are used to quantify the concentration of a substance in a sample.


What is the difference between scientific method and socratic method?

ice baby