Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

loop array using stream java

int[] ns = new int[] {1,2,3,4,5};
int[] ms = Arrays.stream(ns).map(n -> n * 2).filter(n -> n % 4 == 0).toArray();
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #loop #array #stream #java
ADD COMMENT
Topic
Name
4+5 =