Swift: Structure and Class Syntax

Structures and Classes have similar syntax definition. We create structures using the struct keyword and classes using the class keyword. As structures and classes are new Swift type, we use upperCamelCase for their names. The property and method names defined inside them have to be in lowerCamelCase.


Leave a Reply