📜  如何反转列表 kotlin - 任何代码示例

📅  最后修改于: 2022-03-11 15:00:41.851000             🧑  作者: Mango

代码示例1
import java.util.Collections
 
fun main() {
    val days: List = listOf("Sunday", "Monday", "Friday")
 
    Collections.reverse(days)
 
    println(days)            // [Friday, Monday, Sunday]
}