Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.util.Arrays;
import java.util.stream.IntStream;

public class Main {

    public static void main(String[] args) {

        int[] numbers = { 2, 3, 5, 7, 11, 13 };
        IntStream intStream = Arrays.stream(numbers);
        intStream = intStream.limit(3);
        System.out.println(intStream.sum());
    }

}