Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


What is the difference between method and message?

Answers were Sorted based on User's Feedback



What is the difference between method and message?..

Answer / smita

Message:
Objects communicate by sending messages to each other. A
message is sent to invoke a method.

Method:
Provides response to a message. It is an implementation of
an operation.

Is This Answer Correct ?    117 Yes 15 No

What is the difference between method and message?..

Answer / dd

Method is a function or procedure that is defined for a
class and typically can access the internal state of an
object of that class to perform some operation. While
message is refer to instruction that is send to object which
will invoke the related method.

Is This Answer Correct ?    58 Yes 5 No

What is the difference between method and message?..

Answer / scott

A message is any packet of communication between objects.
The objects may be in the same program, or they may be on
different systems. It simply doesn't matter.

A method is a block of code attached to an object by some
means. It may be implicitly attached by means of a class,
or it may be an anonymous closure attached to an arbitrary
attribute of the object.

Is This Answer Correct ?    16 Yes 4 No

What is the difference between method and message?..

Answer / rajputvishal

A message is an instruction to perform some operation send by an object to another object which will perform the operation.

A method is the implementation which is executed after receiving the message

Is This Answer Correct ?    11 Yes 2 No

What is the difference between method and message?..

Answer / earvinyuvi

Message:
Objects communicate by sending messages to each other. A
message is sent to invoke a method.

Method:
Provides response to a message. It is an implementation of
an operation.

Is This Answer Correct ?    2 Yes 1 No

Post New Answer



More C++ General Interview Questions

How do you compile the source code with your compiler?

0 Answers  


Write a program which uses functions like strcmp(), strcpy()? etc

0 Answers  


Who calls main function?

0 Answers  


What is the output of printf("%d")?

58 Answers   CTS, HCL, Infosys, TCS, Winit, Wipro,


What is the most powerful coding language?

0 Answers  






How static variables and local variablesare similar and dissimilar?

0 Answers  


Evaluate the following expression as C++ would do :8 * 9 + 2 * 5 a) 82 b) 79 c) 370 d) list

0 Answers  


What is helper in c++?

0 Answers  


Reads in the size of a square from the screen; 2. Prints a hollow square of that size out of “-“, “|” and blanks on screen; 3. Prints the same hollow square onto a text file. Your program should work for squares of all side sizes between 1 and 20. --- &#9474; &#9474; &#9474; &#9474; &#9474; &#9474; ---

0 Answers  


Why is polymorphism useful?

0 Answers  


catch(exception &e) { . . . } Referring to the sample code above, which one of the following lines of code produces a written description of the type of exception that "e" refers to? a) cout << e.type(); b) cout << e.name(); c) cout << typeid(e).name(); d) cout << e.what(); e) cout << e;

2 Answers   Quark,


Given an array of size N in which every number is between 1 and N, determine if there are any duplicates in it. You are allowed to destroy the array if you like. [ I ended up giving about 4 or 5 different solutions for this, each supposedly better than the others ].

1 Answers  






Categories