스트림4 중간연산 예제
스트링의 중간연산 예제 Stream skip (long n) //앞에서부터 n개 뛰어넘기 Stream limit (long maxsize) //maxsize 이후에 요소는 잘라냄 IntStream intStream = IntStream.rangeClosed(1,10) //12345678910 intStream.skip(3).limit(5).forEach(system.out.println("")) //45678 //.skip(3) 앞에서 3개 건너 뛰기 45678910 //.limit(5) 앞에서부터 5개 만 가져오기 45678 IntStream intStream = IntStream.of(1,2,2,3,3,3,4,5,5,6) intStream.distinct().forEach(system.out.prin..