Last active
July 21, 2022 14:14
-
-
Save MasoudFallahpour/65845d9a66d19896dbde514407af6a1f 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
fun main() { | |
val user = User().apply { | |
println("firstName is written") | |
firstName = "John" | |
println("lastName is written") | |
lastName = "Doe" | |
} | |
println("firstName is read") | |
val firstName = user.firstName | |
println("lastName is read") | |
val lastName = user.lastName | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment