Parameters

A function can have zero or more parameters. Our function, basicFunction, takes two parameters, as shown in the following code:

fun basicFunction(name: String, size: Int) {

}

Each parameter is defined as parameterName: ParameterType, in our example, name: String and size: Int. Nothing new here.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.116.49.247