Kotlin 函数编程详解

函数 Functions.gif 函数声明 Functions in Kotlin are declared using the fun keyword: fun double(x: Int): Int { return 2 * x } 调用函数 Calling functions uses the traditional approach: val result = double(2)
相关文章
相关标签/搜索