0
Qué diferencia hay entre importar y heredar una clase?
No entiendo la diferencia
1 Réponse
+ 11
Importing a class, is making it so you can use that class without needing to qualify the full name in the current class you are writing.
import java.util.Scanner;
Extending a class is creating a new class that is a subclass of some other class. This will allow you to add or change functionality of the class you are extending.
public class EmptyList extends ArrayList {
@Override
// ...
}