How can I convert this statement from classic java to android
Collection<Integer> p1;
int sum = p1.stream().mapToInt(Integer::intValue).sum();
I integrate Java 8 and lambda to my android application, but it still does not work. The method stream() does not found in android.
Can you help me?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…