Interface (I/F)

Definition - What does Interface (I/F) mean?

An interface specifies a group and/or a set of methods, which have not been implemented. When a class implements an interface, the class provides an implementation to all defined interface methods. A single class may implement any number of interfaces. Sometimes, constant declarations are included in an interface, along with method definitions.

Disadvantages for the interface is that all interface methods must be public and only abstract methods may be used in an interface. However, because these methods are implicit, they are not declared.

Techopedia explains Interface (I/F)

An interface is best explained with an example. The most common example is the connections among a television, a remote control, and a user. A user turns on the TV by using the remote control and may not necessarily know anything about the TV’s wiring. Thus, the remote control is an interface between the user and the television set.

Similarly, when a class implements an interface, the method functionalities are implemented without knowledge of the method's inner workings.

The following are examples of when to use an interface:

  • When two or more unrelated classes implement a set of methods, which may be defined in an interface and then implemented by the classes.
  • When an interface is a good alternative to multiple class inheritance.
  • When an object’s functionality is revealed without described implementation.
This definition was written in the context of Programming
Share this:

Connect with us

Email Newsletter

Join thousands of others with our weekly newsletter

The 4th Era of IT Infrastructure: Superconverged Systems
The 4th Era of IT Infrastructure: Superconverged Systems:
Learn the benefits and limitations of the 3 generations of IT infrastructure – siloed, converged and hyperconverged – and discover how the 4th...
Approaches and Benefits of Network Virtualization
Approaches and Benefits of Network Virtualization:
Businesses today aspire to achieve a software-defined datacenter (SDDC) to enhance business agility and reduce operational complexity. However, the...
Free E-Book: Public Cloud Guide
Free E-Book: Public Cloud Guide:
This white paper is for leaders of Operations, Engineering, or Infrastructure teams who are creating or executing an IT roadmap.
Free Tool: Virtual Health Monitor
Free Tool: Virtual Health Monitor:
Virtual Health Monitor is a free virtualization monitoring and reporting tool for VMware, Hyper-V, RHEV, and XenServer environments.
Free 30 Day Trial – Turbonomic
Free 30 Day Trial – Turbonomic:
Turbonomic delivers an autonomic platform where virtual and cloud environments self-manage in real-time to assure application performance.