- 1 current stop: learning
- 2 upcoming
- 3 upcoming
- 4 upcoming
- 5 upcoming
Finish after stop 5
Stop 1 of 5 · Bike shop: sorting the toolbox
Trick to keep in mind+3 XP
Count the arrows: Function is one in, one out. Supplier has no input, Consumer has no output.
Each functional interface is named after its shape. Function<T, R> takes a T and hands back an R, which may be a different type. Supplier takes nothing and produces something. Consumer takes something and returns nothing. Predicate takes something and answers true or false, and UnaryOperator is a Function whose input and output types must match.
Read it once, then a question tests whether the trick stuck.