What is the shortest way to express "get a new list B from list A, where is the condition" via Java 8 lambda?
Let's say I have List<Integer> a = Arrays.asList(1, 2, 3, 4, 5) , and I need a new List, B, where the value is> 3.
I read the new streaming collections API, but I'm not sure I have found a better way to do this, and I don't want to relax the question with what is probably my less perfect solution.
source share