Getting fields of classes

Report a typo

Here is a class with a function and a constructor:

class MagicClass(val magic: Int) {

    fun magicFun(a: Int): Int { return a * magic}
}

Here is an instance of the class:

val instance: MagicClass = MagicClass(10)

Select all the correct function references.

You may need to experiment with the code locally to solve this problem.

Select one or more options from the list
___

Create a free account to access the full topic