Skip to content

Commit

Permalink
Update kotlin_1.kt
Browse files Browse the repository at this point in the history
  • Loading branch information
limpidsa authored and random1223 committed Aug 31, 2024
1 parent b606457 commit 2a47c2d
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions code-issue-examples/kotlin-test-resources/kotlin_1.kt
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
class Lamp {
class Lamp {

// property (data member)
private var isOn: Boolean = false
// property (data member)
private var isOn: Boolean = false

// member function
fun turnOn() {
isOn = true
}
// member function
fun turnOn() {
isOn = true
}

// member function
fun turnOff() {
isOn = false
}
}
}

fun main(args: Array<String>) {

val l1 = Lamp() // create l1 object of Lamp class
val l2 = Lamp() // create l2 object of Lamp class
}
}

0 comments on commit 2a47c2d

Please sign in to comment.