Hi all, If my kotlin interface returns a nullable ...
# getting-started
g
Hi all, If my kotlin interface returns a nullable value, how can I define an implementation of this interface in java that returns optional? That seems to me what nullable kotlin type translates to in java world
d
The Nullable type in Kotlin is just the normal type in Java, so Java clients would have to use null checks.
g
😞
thank you
d
You could provide separate
optionalFoo
wrappers that return
Optional.ofNullable(foo())
g
right thank you