On another forum I found a solution to my problem, converting an ArrayList to int. The solution was simply brilliant, so I'd like to read more upon it - But I don't know where to look. Could someone guide me as to what the following falls under:
int arr = list.stream().filter(i -> i != null).mapToInt(i -> i).toArray();
Basically ,they are Java8 streams, which will be helpful to process (filter/aggregate/group) the data from collections (list/set/etc..).
Java Collections(List/Set/Map/etc..) are just data structures which can be used to store the data.
Java Streams provide advanced methods to process (filter/aggregate/group i.e., to perform sql like operations) the data from Collections.
Please start with the below tutorial to get more on this: http://www.oracle.com/technetwork/articles/java/ma14-java-se-8-streams-2177646.html