Is `Unit` the equivalent of Java's `Void` rather t...
# getting-started
f
Is
Unit
the equivalent of Java's
Void
rather than lowercase
void
?
s
It serves as both
k
Kind of, Java
Void
doesn't have an instance but it allows
null
so that's kind of the single instance.
I think it’s the equivalent for kotlin’s
Void?
a function which return
Nothing
can’t return, only throws or keep working
Sorry, meant
Unit?
Unit
is mapped to
Void
in Java
Yep, and what
Unit?
is mapped to?
into Java code
there’s not
Unit?
in Java…..
Got it 🙂
Thanks
Thanks 🙂