swiftstaticfinal

static vs. final in Swift


What is the difference between static and final keywords in Swift? When should each be used?

I understand that for a static Class nothing can inherit from it, but that is also true for final.

Thank you


Solution

  • So, after a while research I would say that static is used for a property that can be accessed without created a class instance and final is a modifier for a class that from this class nobody can be inherent.