Answers for "how to write a kotlin"

2

how to write a function in kotlin

// Use 'fun' keyword to declare function
// 'num' is the parameter and is of type Int
// The ':Int' indicates the return type
fun square(num: Int):Int {
    return num * num
}
Posted by: Guest on November-06-2020
1

kotlin syntax

val x = 5
val y = 6
println(x + y) // Print the value of x + y
Posted by: Guest on September-08-2021

Code answers related to "how to write a kotlin"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language