-3
在Kotlin
我可以這樣寫:數據類接口
interface KeyMapperService {
interface Add {
data class Success(val key: String, val link: String): Add
data class AlreadyExist(val key: String): Add
}
interface Get {
data class Link(val link: String): Get
data class NotFound(val key: String): Get
}
fun add(key: String, link: String): Add
fun getLink(key: String): Get
}
這將如何代碼看起來像Java中?我不明白。
的IntelliJ有科特林反編譯。 – Moira