Last active
April 11, 2018 18:45
-
-
Save igorwojda/c2302a3d1bf3e55cee45beb493ae1a63 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
//BAD | |
class Person () { | |
private var weight:Double = 0 | |
fun setWeight(weight:Double) { | |
this.weight = weight | |
} | |
fun getWeight(): Double { | |
return weight | |
} | |
} | |
//GOOD | |
class Person (var weight:Double) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment