Libraries, interface, classes and methods

9

What's the difference between libraries and interfaces?

For example, in the line:

import java.util.Scanner;

Would util be the interface and Scanner of the class? Or would util be the library and Scanner would still be the class?

In the case of methods with @Override it only makes sense when working with interfaces? In case of inheritance I do not know if you have so much reason.

    
asked by anonymous 08.09.2015 / 14:43

1 answer

10

The terms are completely wrong and mixed.

There is a relationship between class and interface.

Library is a generic term that is not used in the code itself. What you are probably talking about are packages .

So in the example the java.util is the package. And Scanner is the class.

You are not currently using interface there. More information . When to use .

See how to use @override . More information .

    
08.09.2015 / 14:49