views:

40

answers:

1

I want to write a function printAll(), which accepts only those elements that implement that implement Iterable so that I can iterate over them and print the elements. How do I do that?

+6  A: 

public static void printAll(final Iterable<?> toIterate).

Hank Gay
I feel like an idiot.
kunjaan