Posts by Bruno Pinela • 1 point
1 post
-
0
votes2
answers587
viewsA: Turn a for into lambda with variable interaction
Oops, so you take the elements from your list and apply a foreach: Example: List<Integer> list = Arrays.asList(1, 2, 3, 4, 5, 6, 7); list.forEach(n -> System.out.println(n)); Anything look…