Can someone please help me understand the correct use of getters and setters in swift. I get the impression its not the same as say Java.
Is this the correct usage i
This is how setter and getter works as in Java:
class Person { private var _name private var _age // .... other properties var name: String { get { return _name } set { _name = newValue } } var age: String { get { return _age } set { _age = newValue } } }