febs
11/26/2018, 12:50 PMdiesieben07
11/26/2018, 12:52 PMval a: String
if (condition) {
a = "foo"
} else {
a = "bar"
}
diesieben07
11/26/2018, 12:53 PMfebs
11/26/2018, 12:54 PMfebs
11/26/2018, 12:54 PMdiesieben07
11/26/2018, 12:54 PMinit { }
block (or constructor), since you can't just write inside the class body.diesieben07
11/26/2018, 12:55 PMval antani: String
init {
antani = "ciao"
}
febs
11/26/2018, 12:56 PMdiesieben07
11/26/2018, 12:56 PMdiesieben07
11/26/2018, 12:57 PMdiesieben07
11/26/2018, 12:57 PMinit
.diesieben07
11/26/2018, 12:57 PMantani = "ciao"
code cannot be put at that place.febs
11/26/2018, 1:13 PMdiesieben07
11/26/2018, 1:14 PM