N
N
NoMoneyException2016-09-16 00:50:39
Java
NoMoneyException, 2016-09-16 00:50:39

How to correctly implement an interface method if there is also an abstract class?

Hello. There is an interface:

public interface Food {
    void ShowProperties();
}

It is implemented (more precisely, it is not known how to call it) an abstract class:
public abstract class Meal implements Food {

    @Override
    public abstract void ShowProperties();
}

And further already implementation in the last class. Is it correct to do this, use @Override and somehow forward the method further up the hierarchy? Or maybe just implement it in the final class, bypassing the abstract one?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Evhen, 2016-09-16
@eugene_leshchinskiy

abstract class is not needed

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question