I am trying to convert a return new array in Java to Kotlin. I have tried using the docs but doesn't seem to work.
Below is the java code
public ScoreController[] newArray(int size) {
return new ScoreController[size];
}
Below is Kotlin code that I trying to do
override fun newArray(size: Int): Array<GenderController> {
return arrayOfNulls(size)
}
The kotlin code isn't happy :(