9
What’s the difference between libraries and interfaces?
For example, on the line:
import java.util.Scanner;
The util
would be the interface and Scanner
the class? Or the util
would be the library and the Scanner
would still be the class?
In the case of methods with @Override
only makes sense when working with interfaces? In case with inheritance I don’t know if it has so much reason.
Aren’t packages the folders that separate classes within src? So the library is more like a dependency than being part of the code itself?
– André Nascimento
Yes, they are. I would say better, that packages add classes. Your idea is right but the term is wrong. One can say that the library is a set of compiled packages. And of course there is the dependency.
– Maniero