What is the difference between properties and parameters in Kotlin?

Viewed 6369

Here is a simple example of a class with some code (properties) inside the bracket

class Person(firstName: String) {
....
}

Now here is an example of a function with some code (parameters) inside the bracket

fun double(x: Int) {
...
}

I know this is a fundamental question but I am quite confused as a beginner.

3 Answers
Related