how can i use class parameters in function in kotlin? code example
Example 1: how to instantiate a class in kotlin
private var xyz = ClassXYZ()
Example 2: function kotlin
// Declare a function in Kotlin
fun happyBirthday(name: String, age: Int): String {
return "Happy ${age}th birthday, $name!"
}
// Call function
val greeting = happyBirthday("Anne", 32)