Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.*;
- /**
- * Hello, world! program using Optional monad
- */
- public class HelloWorld {
- public static void main(final String[] args) {
- Optional.of("Hello, world!").ifPresent(System.out::println);
- }
- }
Add Comment
Please, Sign In to add comment