Files

11 lines
371 B
Java

import java.io.IOException;
import java.util.stream.Stream;
// Deliberately does NOT compile. scripts/run-all.sh captures the real javac message.
public class LambdaChecked {
static String read(String n) throws IOException { return n; }
public static void main(String[] args) {
Stream.of("a", "b").map(n -> read(n)).forEach(System.out::println);
}
}