摘要: 一、构造方法的组成 1、主构造方法 class View(tt: Int) {.....} class View constructor(tt: Int) {....} 如上所示有两种方式,且都是在类体外的括号中 第二种方式增加了constructor,正常情况下constructor是可以省略,除 阅读全文
posted @ 2023-10-18 00:11 LCAC 阅读(962) 评论(0) 推荐(0)