Interfaces are hardcore contracts with no method that can contain bodies .

Ok , We made an interface with abstract methods now what ?
We create another class that ” IMPLEMENTS ” that interface
note : Every method from the interface must be implemented or , you will obtain an error.

Let’s create two classes in this case to be able to see how we will receive different outputs from the main class

Good so we have an interface , 2 classes let’s now make our main class that will execute everything.

I wonder what are we going to get as an output ?

See , the difference . Utilizing interfaces are important concept in the world of developers and software engineers.
Since, the contract defining what a client can expect leaves the developer free to implement it any way they choose, as long as they uphold the contract.