Home > Back-end >  JAVA API
JAVA API

Time:09-25

Why API called the application programming interface? Why is the interface? The inside of the API is not a class library, he method is abstract? If not all abstract, why call interface?

CodePudding user response:

The API is not a class library? Is not it is a set of methods said the definition of a certain ability to standardize programming it is not necessarily the abstract suggests that it should have these methods only
For example windos we write the program cannot directly call the kernel hardware
But by the operating system provides a good API interface to operate the hardware and system function and so on,
Only know that there is no need to worry about this method specific implementation, as long as after operating procedures provide the API
Don't have to change our program can also run, doesn't it is Java cross-platform program written in your windos Linux can run (if you want to install environment)
Why? Because the JVM is to provide our API implementation
Because as we don't have to pipe the underlying implementation interface,

CodePudding user response:

The concept and Java interface is different,
The things you want to call others (called the application), others must provide methods to will you be able to call you, others to provide you with this method, call interface, is the concept of the meaning of the interface is more widely than Java (can be understood as the interface is A method, including the abstract and not abstract), so often hear some people say that project to project B docking, docking? It needs to provide docking interface of the project, so the concept of the interface so come, the concept of the interface itself is in order to more image system (or application) is exposed to the outside world (or provide for the use of the outside world) entrance, like the computer motherboard, it provides the slot of the CPU, graphics card slot, memory stick slot and so on, these slot call interface, is the mainboard developers in order to let the user can use the mainboard and open to the user's entry, likewise, for the software, the developer of the application in order to let user can invoke its application, also need to provide users with calls its method and the entrance, the entrance are collectively referred to as interface,

CodePudding user response:

The
refer to the original poster a 223317 response:
why API called the application programming interface? Why is the interface? The inside of the API is not a class library, he method is abstract? If not all abstract, why call interface?


The API or Application Programming Interface

CodePudding user response:

The realization of the function of interface is implemented by the application developer, and provide external personnel use, outsiders don't know and don't need to understand the principle of the interface,

CodePudding user response:

Actual interface interface can understand abstract methods for all is the abstract class, because the interface implementation classes have to implement the interface methods, different literal meaning is interface, the interface with a layer of the meaning of "foreign", an abstract class may only be used to "abstract", how to write,

CodePudding user response:

Piss me off, on talent!!!!!
Why API called the application programming interface? Here said the "interface" is not the interface, as in the Chinese context, its meaning is different, like a polysemous word, such as:
1, xiao Ming went fishing today
2, police procedurals sometimes takes long to catch the big fish
Police catch of fish is bad, not the fish in the water, so the interface programming interface, is not a class, interface, but others give you use some of the things, these things can call interface, and, for example, when doing the Android development or front-end development, need the background to provide data, generally we via the url to get the background data, and the background to provide us with the url can also be used to get data call interface, waiting for you to work will often hear, for instance, the front desk said to the background, you have a login interface problem, meaning is to use the background to provide login url, and pass the corresponding parameters according to the requirement, but also can't log in, can say "login interface has a problem,"
  • Related