Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
9
Task/Compound-data-type/Kotlin/compound-data-type.kotlin
Normal file
9
Task/Compound-data-type/Kotlin/compound-data-type.kotlin
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
data class Point(var x: Int, var y: Int)
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val p = Point(1, 2)
|
||||
println(p)
|
||||
p.x = 3
|
||||
p.y = 4
|
||||
println(p)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue