리턴값이 없는 void 여도
every 테스트 코드 작성시에는 "returns Unit" 을 작성해준다
package kotlin
/**
* The type with only one value: the `Unit` object. This type corresponds to the `void` type in Java.
*/
public object Unit {
override fun toString() = "kotlin.Unit"
}'Dev Back > Kotlin' 카테고리의 다른 글
| [Kotlin] Gradle $buildDir 이슈 (0) | 2024.12.06 |
|---|