Messages and Object Communication

  • Objects communicate via messages

  • Valid messages represented by public interface

  • Messages, in Java, correspond to method calls
    (invocations)

  • Must have a reference
    to the target object to
    send a message


                                           /* Send help button a msg */
                                           helpButton.setEnabled(false);

  • If no object specified, the current object (this) is
    assumed, e.g., f() implies this.f()