Interface (computing)

Applications or programs running on the operating system may need to interact via data streams, filters, and pipelines.

[7] Software interfaces provide access to computer resources (such as memory, CPU, storage, etc.)

of the underlying computer system; direct access (i.e., not through well-designed interfaces) to such resources by software can have major ramifications—sometimes disastrous ones—for functionality and stability.

[citation needed] An interface called "Stack" might define two methods: push() and pop().

For example, the Java language defines the interface Readable that has the single read() method; various implementations are used for different purposes, including BufferedReader, FileReader, InputStreamReader, PipedReader, and StringReader.

Marker interfaces like Serializable contain no methods at all and serve to provide run-time information to generic processing using Reflection.

The idea behind this approach is to base programming logic on the interfaces of the objects used, rather than on internal implementation details.

[12] Pushing this idea to the extreme, inversion of control leaves the context to inject the code with the specific implementations of the interface that will be used to perform the work.

Hardware interfaces of a laptop computer: Ethernet network socket (center), to the left a part of the VGA port, to the right (upper) a display port socket, to the right (lower) a USB -A socket.