Skip to content

Latest commit

 

History

History
executable file
·
11 lines (6 loc) · 593 Bytes

888a.md

File metadata and controls

executable file
·
11 lines (6 loc) · 593 Bytes

Back to questions

Solution to 888a: Generic methods with streams

See code at solutions/code/tutorialquestions/question888a

Compare your solution with the code in the sample solution.

The main thing to understand about the code for these questions is that generic type information for a method (e.g. of the form <S, T>) comes before the return type of the method, and after any other keywords such as static or public.

The sample implementation of zip, which uses IntStream and mapToObj, is worth studying carefully.