[code lang=”kotlin”]enum class Size(val sizeNumber: Int) { SMALL(0), MEDIUM(1), LARGE(2); }[/code]. 上面的代码在 Size 的主构造器中声明了 Int ...
確定! 回上一頁