标签: kotlin
fun main (args: Array<String>) { val Myself = "Programmer" var Alphi = Myself[5] println(Alphi) }
上面的代码工作并输出a。
答案 0 :(得分:4)
与Java相同:
val myself = "Programmer" val alphi = myself.substring(3)