I have read few articles about API. Can't find the reference now.
In some of them, they define API as set of tools, routines and protocols which are helping programmer to build a software with use of pre-programmed methods.
In others they say the same thing, but they also say that API is only when these methods are communicating with some external systems/services.
Which one is right? I just want to know, that if I use library to draw in Java, is that called API because it contains pre-programmed methods or that is just library/component?