Defining a Class

suggest change

You define a class like this:

class Dog {}

A class can also be a subclass of another class:

class Animal {}
class Dog: Animal {}

In this example, Animal could also be a protocol that Dog conforms to.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents