GeekInterview.com
Series: Subject: Topic:
Question: 145 of 238

What is the difference between methods and functions?

This question is related to TCS Interview
Asked by: Interview Candidate | Asked on: Jul 8th, 2006
Showing Answers 1 - 15 of 15 Answers
kishore

Answered On : Sep 19th, 2006

Methods are calling using objects.

FUNCTIONS ARE DIRECTLY CALLING

  
Login to rate this answer.
sreelekha

Answered On : Sep 24th, 2006

methods are invoked using objects.

wheres as in case of functions here is no quesion of objects.

we can it directly

  
Login to rate this answer.
srinivas Y

Answered On : Nov 8th, 2006

 The major difference between methods and functions is that methods called by the reference variables called objects where as the functions do not having any reference variables.

Yes  3 Users have rated as useful.
  
Login to rate this answer.
user

Answered On : Jun 24th, 2009

View all answers by user

Functionhave independent existence which means they are defined outside the class. Method do not have independent existence that means they are defined inside the class.

Yes  3 Users have rated as useful.
  
Login to rate this answer.
zyduss

Answered On : Jun 26th, 2009

View all answers by zyduss

The major difference between methods and functions is that methods called by the reference variables called objects where as the functions do not having any reference variables.

Yes  2 Users have rated as useful.
  
Login to rate this answer.
jirolu

Answered On : May 13th, 2010

View all answers by jirolu

It is where about return or not return value

Method -> does not give return value, as subroutine or procedure
Function -> gives return value

  
Login to rate this answer.
avula chiru

Answered On : Sep 30th, 2010

View all answers by avula chiru

The name methods are used in the language Java, in this language we called functions are the methods but in C language we simply called these are functions, because the Java contains class and objects. Methods are called by object variable.

  
Login to rate this answer.
tapassaha

Answered On : Nov 6th, 2010

View all answers by tapassaha

The major difference between methods and functions is that methods called by the reference variables called objects where as the functions do not having any reference variables.

Yes  1 User has rated as useful.
  
Login to rate this answer.
KESHAV KUMAR

Answered On : Jul 18th, 2011

Method and function are the same thing but their are minor difference between them. these difference are : function return some value but method doesn't return anything . function have return type but method has no return type But we can use both the same things . Example : some books prefer that strlen() function And some books

Code
  1.  
  2. prefer  strlen() method .
  3.  

  
Login to rate this answer.
Mani Prakash

Answered On : Aug 6th, 2011

Let me explain the difference between the method and function.

Method is used to for doing the things especially in a systematic way implies an orderly logical arrangement.

The function is a self-contained block of statements that perform a coherent task of some kind.

  
Login to rate this answer.
prabhaamca11

Answered On : Aug 10th, 2011

View all answers by prabhaamca11

both methods and functions are set of statements to perform certain tasks...

when it places inside the class it is called as methods. methods are used to call by using objects and we can pass references as parameter.Ex. c++,java

if it is placed inside main function called as functions. function is called directly by the main program and doesn't use references. Ex c language functions

  
Login to rate this answer.
nivas310

Answered On : Aug 17th, 2011

View all answers by nivas310

What a C/C++ programmers calls a function,we can call it as methods in Java.
We can insert functions into methods,but we cannot insert methods into functions.

  
Login to rate this answer.
Ajmal

Answered On : Aug 30th, 2011

I don't think so. Only the constructor do not have a return type. All other methods should have return type.

And I believe that the functions inside a class is termed as method.

I'm sorry if this is wrong

  
Login to rate this answer.
yatin

Answered On : Sep 6th, 2011

methods is a calling procedure
function is a small program

  
Login to rate this answer.
MEGHA GUPTA

Answered On : Sep 11th, 2011

Methods are functions only which have defined classes they are in JAVA and C#..
functions are in C

  
Login to rate this answer.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

Related Open Questions

Ads

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Ads

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.