r/learnjava • • Aug 13 '20

What is a library in Java?

I hear the term of standard libraries a lot in Java. is a library just a collection of packages, which is indirectly a collection of classes. So would that make a library a collection of classes? What makes a library different from a standard library?

Edit: I do see this answer on this link below where they say packages and standard library are the same thing. https://stackoverflow.com/questions/10868825/where-can-i-find-a-list-of-the-java-standard-libraries

But this link here: https://docs.oracle.com/javase/tutorial/java/concepts/package.html tells me that packages and libraries are a different thing. So I guess my question now also is where can I find this standard library, and are there multiple standard libraries or are there just one?

56 Upvotes

5 comments sorted by

View all comments

2

u/abcoolynr Aug 13 '20

the standard library is the library(package containing classes) shipped along with a Java version. Whereas the library includes standard+user-defined libraries.