摘要:
面向对象:/** * 类与对象 *///创建一个类open class Person { var name = "" var age = 0 fun eat() { //第一种用变量的方法 print(name + "is eating." + "He is" + age + "years old" 阅读全文
posted @ 2021-08-11 15:16
白晨里的影子
阅读(47)
评论(0)
推荐(0)
摘要:
Kotlin的基础: Int,Short,Long,Float,Double,Boolen,Char,Byte,和Java对比所有首字母变大写,而且Kotlin只有引用类型,没有像Java有引用类型和基本数据类型 函数(方法):fun 函数名() /** * 变量 */ //可变变量 var h = 阅读全文
posted @ 2021-08-11 10:55
白晨里的影子
阅读(54)
评论(0)
推荐(0)

浙公网安备 33010602011771号