r/learnjava • u/HeyUnkown • 17d ago
Library vs API (Java ☕️)
Hey Everyone!
I need some help as I am Confused in Libraries and API like what is the difference in between them, where to implement what, and recommend me some resources where I can Clearly understand these two.
Thank you all in Advance.
10
Upvotes
3
u/gekigangerii 17d ago
Let's say a library is the package that you want to use.
An API is the contract on how the user is expected to use the library, leaving the internal implementation inacessible.