I've got this code-snippet. It shall demonstrate the order, in which constructors are executed:
fun main(args: Array<String>) {
Sample("T","U")
}
class Sample(private var s : String) {
constructor(t: String, u: String) : this(t) { // I don't get what "this(t)" is!
this.s += u
}
init {
s += "B"
}
}
What's the ": this(t)" in the declaration of the secondary constructor?
That isn't the return-type? Isn't it?