Last active
August 12, 2023 13:07
-
-
Save faizul14/8d84d9c264f07cc164f0798dc214fcfe to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Person { | |
var name: String = "" | |
var age: Int = 0 | |
} | |
val person = Person().apply { | |
name = "R AL" | |
age = 22 | |
} | |
println("Name: ${person.name}, Age: ${person.age}") | |
// Output: Name: R AL, Age: 25 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment