표준입력 (stdin)
실행옵션 (runtime option)
코드:
실행 »
표준입력/실행옵션
import java.util.Comparator; import java.util.stream.*; public class prog { public static void main(String[] args){ Stream<String> stream1 = Stream.of("JAVA", "HTML", "JAVASCRIPT", "CSS"); Stream<String> stream2 = Stream.of("JAVA", "HTML", "JAVASCRIPT", "CSS"); stream1.sorted().forEach(s -> System.out.print(s + " ")); System.out.println(); stream2.sorted(Comparator.reverseOrder()).forEach(s -> System.out.print(s + " ")); } }