표준입력 (stdin)
실행옵션 (runtime option)
코드:
실행 »
표준입력/실행옵션
import java.util.stream.*; public class prog { public static void main(String[] args){ IntStream stream1 = IntStream.range(0, 10); IntStream stream2 = IntStream.range(0, 10); IntStream stream3 = IntStream.range(0, 10); stream1.skip(4).forEach(n -> System.out.print(n + " ")); System.out.println(); stream2.limit(5).forEach(n -> System.out.print(n + " ")); System.out.println(); stream3.skip(3).limit(5).forEach(n -> System.out.print(n + " ")); } }