Wildcard not allowed for Iterable in Java

I have following code setup. But this is not allowed as wildcard is not allowed for Iterable. public interface CustomInterface extends Iterable{….} CustomTypeA extends …

How can I make my class iterable so I can use foreach syntax?

I have Book and BookList classes. BookList is something like this: public class BookList { private final List bList = new ArrayList(); public int size() { return …

What is the Iterable interface used for?

I am a beginner and I cannot understand the real effect of the Iterable interface.