I tried to understand the use of interface
and read this article which says:
Interfaces define a standardized set of commands that a class will obey.
The commands are a set of methods that a class implements.
The interface definition states the names of the methods and their return types and argument signatures. There is no executable body for any method that is left to each class that implements the interface.
I would like to ask why do I need to state name of methods and their return types and argument signatures in an interface
while I can implement them directly in a class
?