I am confused if java.util is a package or a library.What is the difference between a package and library?
Asked
Active
Viewed 4,305 times
6
-
Definitely a package, part of a library (the standard one): http://docs.oracle.com/javase/7/docs/api/java/util/package-summary.html – skypjack Nov 06 '15 at 06:51
-
A library is a general purpose term which means *one or more classes providing a set of functions*. Library and packages are two different things. – TheLostMind Nov 06 '15 at 06:52
-
It's pretty much both. – Louis Wasserman Nov 06 '15 at 07:04
-
What is the relevance to you? Why do you bring this up? I'm sure you have seen people refer to the "java.util library". That would be loose usage but as long as you understand what it means, what's the issue? – Erwin Bolwidt Nov 06 '15 at 07:09
-
1Understanding is never bad. Why so many questions asking why he is interested in understanding it? – skypjack Nov 06 '15 at 07:22
-
@skypjack because understanding why a person asks a question is also never bad, it helps to make the question more specific and less chance of being a duplicate. – Gimby Nov 06 '15 at 07:59
1 Answers
9
According to Java documentation, java.util
is a package and part of Java class library:
A package is a namespace that organizes a set of related classes and interfaces.
...
The Java platform provides an enormous class library (a set of packages) suitable for use in your own applications. This library is known as the "Application Programming Interface", or "API" for short.
Related questions: