Created
March 15, 2017 21:39
-
-
Save carlosmaniero/db32f5e5415ad6e6b7d9b73f62beb61d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Arrays; | |
public class StreamSum { | |
public static void main(String args[]) { | |
int[] array = new int[]{1, 2, 3, 4, 5}; | |
int sum = Arrays.stream(array).sum(); | |
System.out.println(sum); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment