Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardJavaOptional patternsSingle-choice MCQ

What does the snippet output?

System.out.println(Optional.of(5).filter(x -> x > 0).orElse(0));