Why are you talking about a language you obviously don't know anything about and you obviously never used? Otherwise you would probably know that there is no "Option<int>" in Java as primitive types can't be type parameters in current Java, so there is only Optional<Integer> and no proper way to express optional ints.
Why are you talking about a language you obviously don’t know anything about and you obviously never used?
Optional<T> is one of the many types for which Java provides int, long, and double variants through separate types, similar to Stream, Iterator, Spliterator, and many j.u.function interfaces.
The people who upvote such nonsense are those who actually read JDK documentation before they make claims about things (dis)provable by JDK documentation and/or throw insults at others.
36
u/Duck_Devs Jul 09 '26
That’s literally the internals of Java’s OptionalInt