摘要: private protected internal: accessable for the project / module public https://kotlinlang.org/docs/reference/visibility-modifiers.html 阅读全文
posted @ 2020-10-13 02:33 Zhentiw 阅读(67) 评论(0) 推荐(0)
摘要: import java.util.* class Animal { var age = 0 get() = field set(value) { if(value >= 0) { field = value } else { throw Error("bad number") } } } fun m 阅读全文
posted @ 2020-10-13 02:27 Zhentiw 阅读(94) 评论(0) 推荐(0)