Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package ch.claude_martin;
- import static java.lang.System.*;
- import java.util.Scanner;
- import java.util.stream.IntStream;
- public final class SomeClass {
- public static void main(String... args) {
- out.println("Enter five lines of Text:");
- try (var s = new Scanner(in)) {
- IntStream.range(0, 5).mapToObj(i -> s.nextLine()).sorted().forEach(out::println);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement