Skip to content

Instantly share code, notes, and snippets.

@higaki
Created February 3, 2020 23:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save higaki/f693e31d61414c67a543518acfff21e5 to your computer and use it in GitHub Desktop.
Save higaki/f693e31d61414c67a543518acfff21e5 to your computer and use it in GitHub Desktop.
import java.util.Arrays;
public class ex3 {
public static void main(String args[]) {
var a = Arrays.asList(1, 2, 3, 5);
var result = a.stream().reduce(1, (s, i) -> s * i);
System.out.println(result);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment