-
Notifications
You must be signed in to change notification settings - Fork 784
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2019-08-19:Kotlin中 Unit 类型的作用以及与Java中 Void 的区别? #124
Labels
Comments
第一。 |
绝对不意气用事。 |
1.在java中,必须指定返回类型,即void不能省略,但是在kotlin中,如果返回为unit,可以省略。 |
@dashuizhu 蜻蜓队长前来觐见 |
Unit : Kotlin 中Any的子类, 方法的返回类型为Unit时,可以省略; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
No description provided.
The text was updated successfully, but these errors were encountered: