Saturday, March 20, 2010

Messages

Software objects interact and communicate with each other by sending messages to
each other. When object A wants object B to perform one of B’s methods, object A
sends a message to object B
There are three parts of a message: The three parts for the message
System.out.println{‘‘Hello World’’}; are:
• The object to which the message is addressed (System.out)
• The name of the method to perform (println)
• Any parameters needed by the method (“Hello World!”)

No comments:

Post a Comment