I'm having a hard time understanding field initial...
# getting-started
r
I'm having a hard time understanding field initialization and secondary constructors, what am I doing wrong here?
Copy code
class MyClass private constructor(val myObject: SomeObjectThatNeedsCodeToInitialize) {
    
    constructor() {
        // how do I initialize an instance of SomeObjectThatNeedsCodeToInitialize
        // and assign it to myObject in a secondary constructor?
    }
}
basically I want to write code in my constructor, but it seems like values declared on the same row as the class needs to be instantiated in the primary constructor, but I can't figure out how to do that