开发者

How to Create a Method that only accepts elements that implement Iterable

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?


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜