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)
相關文章
相關標籤/搜索