摘要:
For data class, you can get 'copy' method, and also destructing: data class Customer (val name: String, val address: String, var age: Int) { // if we 阅读全文
posted @ 2020-10-27 17:04
Zhentiw
阅读(88)
评论(0)
推荐(0)
摘要:
// Shorter version class AnotherAlternativeCustomer (val name: String,var age: Int, val address: String = "") { var approvered: Boolean = false set(va 阅读全文
posted @ 2020-10-27 16:49
Zhentiw
阅读(111)
评论(0)
推荐(0)
摘要:
package com.rsk class Customer (val name: String, val address: String, var age: Int) { // if we don't want to pass in the address constructor(name: St 阅读全文
posted @ 2020-10-27 16:42
Zhentiw
阅读(130)
评论(0)
推荐(0)

浙公网安备 33010602011771号