File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes iOS and the fly likes Difference between Message & Method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Mobile » iOS
Bookmark "Difference between Message & Method" Watch "Difference between Message & Method" New topic
Author

Difference between Message & Method

Vivek Alampally
Ranch Hand

Joined: Jul 10, 2008
Posts: 67
Can anybody here, who knows objective C tell the difference between Message & Method?

What I think is they both are same.
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

Semantics.

Objective-C doesn't call it methods. You send messages to an Object. The Object might or might not respond to the Message, which doesn't automatically cause it to fail. It can keep going.

In Java method calls, it can't keep going, either the class has the method or not, it is a compile time thing now.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15286
    
    6

Mark Spritzler wrote:Semantics.

Objective-C doesn't call it methods. You send messages to an Object. The Object might or might not respond to the Message, which doesn't automatically cause it to fail. It can keep going.


This is why if you try and access a method on an Objective-C object that doesn't exist, you simply get a "Foo may not respond to -bar" warning rather than an error. This is one of my least favorite things about Objective-C.


GenRocket - A Test Data Generation Platform
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Difference between Message & Method
 
Similar Threads
differnce between constructor and method
isInstance
Durable and persistant message
Interface
what is the difference between == and .equals() method????