In computer science's object-oriented programming, a protocol (Java: interface) is what or how unrelated objects use to communicate with each other. These are definitions of methodss and values which the objects agree upon in order to cooperate.
The interface is a description of:
- the messages that are understood by the object,
- the arguments that these messages may be supplied with, and
- the types of results that these messages return.
See also: class, encapsulation, public interface, private interface