When declaring an interface in the class, who should implement it?

3
class Gerente extends Funcionario implements Autenticavel {

It means that Gerente implements the interface Autenticavel , or Funcionario that will implement the interface?

    
asked by anonymous 09.09.2016 / 17:17

1 answer

7

Gerente will implement there right below. The signature of this class has the interface, so it is this class that you have to implement.

If Funcionario had already implemented, even if a reimplementation is done in Gerente , it would not need to declare in that class, it would already be implicitly declared by it to have inherited from a class that already has the interface.

    
09.09.2016 / 17:20