I really need help with interfaces in general...
Any resources that you guys would recommend me?
I really need help with interfaces in general...
Any resources that you guys would recommend me?
What is an Interface? from Java's official tutorial
Edit: A second resource from the same tutorial, is the Interfaces and Inheritence section.
Maybe take a look here. Interface (Java)
Although I think the sun tutorial is better as it might explain it in more detail!
In general:
You can see an interface as a contract or an agreement between two parties. So they can develop independently as long as the interface does not change.
The calling party, knows which behaviour is available and the implementing party knows what to implement.
There are a lot of advantages by using interfaces. One of them is that it is easy to switch between implementations. The other one is that classes can have different (inter)faces without using multiple inheritance.
You might want to have a look at this excellent book by Bruce Eckel (free available in electronic format) : Thinking in Java