If you want to initialize something as part of pri...
# getting-started
e
If you want to initialize something as part of primary constructor, you can either initialize it inline (
val myDeducedValue = "some value"
), or you can put it in an
init
block:
Copy code
class MyClass {
    val myDeducedValue: MyOtherType
    init {
        myDeducedValue = getSomeValue()
    }
}