[Java] About interface, java interface

less than 1 minute read

What is an interface?

Devices and software that enable communication and control by connecting different devices / devices with a computer.

Hardware interface

A standard for the shape of a connector (connector) for connecting hardware devices and a method for transmitting and receiving.
(Example) USB

Software interface

A format for exchanging data between programs
(Example) API

User interface (UI)

It refers to the role of connecting a computer with the human side who uses it. In other words, it acts as an intermediary between personal computers and humans.
(Example) “User interface is difficult to use” = The operation procedure is complicated and the operability is poor.

java interface

ʻInterface` used in Java does not describe the specific processing content of the method included in the class, but defines only the type of variable and method.

Interface member variables are automatically attached with public static final, so they are constants.


Declaration

interface Interface name{}


Implementation

class class name implements interface name{}