I have a java class without a constructor that I want to initialize with a value, is there a shortcut to do this in kotlin or do I have to initialize and use the setter?
d
diesieben07
04/23/2020, 8:53 AM
You can use `also`:
Copy code
val instance = MyJavaClass().also {
it.setValue("foo")
}