摘要:
Any Any 类有3个方法 public open class Any { public open operator fun equals(other: Any?): Boolean public open fun hashCode(): Int public open fun toString( 阅读全文
摘要:
使用break可以跳出循环, 默认情况下是跳出最近一层的循环。 如果需要跳出多层循环, 给for循环添加一个标签, 在需要跳出某层循环的时候,break循环标签即可。 fun testBreak(){ label@ for(i in 1..10){ label2@ for (j in 0..i){ 阅读全文