Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

return n elements from list java

to get first N elements from a list into a list, 
List<String> firstNElementsList = list.stream().limit(n).collect(Collectors.toList());
 
PREVIOUS NEXT
Tagged: #return #elements #list #java
ADD COMMENT
Topic
Name
6+1 =