Is everything an object in Swift? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Is everything an object in Swift?

I have seen in the tutorial that String has some methods associated with it. So is everything an object in Swift, like in Ruby? Or are Int, Character, Bool etc. primitives like in Java?

27th Jan 2018, 8:42 PM
Vlad Serbu
Vlad Serbu - avatar
1 Answer
- 1
any "thing" that derived from a class is an object that is an instance of that class
17th Feb 2018, 3:32 PM
Dominique Abou Samah
Dominique Abou Samah - avatar