Though the subject says i never learned them, I feel the need to say it was not for lack of trying on the professors part. These just proved to be over my head at the time. So, why bothering to learn after the class is long gone you ask? Well, someone asked me how to do them assuming that I would know. The further I got in to trying to help, the more I realized, I have no idea what I was talking about and I said as much to the help requester. This leads me to this forum. With the awesomeness that is NetBeans, I made this interface from a state of pure ignorance with IntelliSense. I am now a true fanboy of NetBeans. So sorry Eclipse and Visual Studio.
Here is my interface.
Now here is my question. Let us just say that the Iterator methods (like hasNext) were implemented already and let's say that the interface has some more sophistication. It should look like a hash table or something like that. It doesn't matter for my question. If I instantiate the extendIter object in Main, and set it to a variable with type ITTR; will I now be able to use the iterator over my hash table, linked list, array?
all that an interface is is a contract. the person who writes the 'public interface XYX' file defines what methods MUST be implemented.
The person who writes the code '<whatever> class ABC implements XYZ' must have those methods defined in their class.
That's it. The methods can be empty, they can be inherited from a superclass, they can do something contrary to what the interface says they should do...it doesn't matter. They just have to be defined.
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors