Ive Vasiljevic
11/27/2019, 3:54 PMclass SomeClass1(private val property: Application)
and
class SomeClass2() {
private val property: Application? = null
}
I've noticed that in the second example of property declaration you HAVE to initialize property otherwise the compiler says that property needs to be abstract or initialized, but on the other hand in the first example initialization is optional.diesieben07
11/27/2019, 3:55 PMproperty
and initializes the property property
with that parameter's value.
The 2nd one declares a no-argument constructorjw
11/27/2019, 3:55 PME.Kisaragi
11/27/2019, 11:45 PM