Hey rancher i have a confusion in the following paragraph that i have took from k&b of page 118 as
" You can extends only one class , but implements many interface. But remember that subclassing define who and what you are , whereas implementing define a role you can play or a hat you can wear, despite how diffrent you might be from some other class implementing the same interface"
in the above paragraph i confused from "But remember that to onwards....
A class that implements the interface agrees to implement all the methods defined in the interface, thereby agreeing to certain behavior. So, we can have different implementation of the same method (that is in interface) in different classes. The coding behavior with interfaces provides a cleaner separation of behavior and implementation.