Difference in classes and structures in swift?



Difference in classes and structures in swift?..

Answer / Ajay Kumar Bhartiya

In Swift, classes are reference types with inheritance, polymorphism, and deinitializers. Structures are value types that cannot have inheritance or deinitializers but can conform to protocols. Classes are generally used for complex objects and structures for simpler data structures.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Apple iOS Swift Interview Questions

What is weak in swift?

1 Answers  


What is differences in swift 1.x, 2.x, 3.x, 4.x?

1 Answers  


What is “defer”?

1 Answers  


How do you make a swift bridging header?

1 Answers  


What is bridging header in swift?

1 Answers  


What is forced unwrapping?

1 Answers  


What is tuple in swift?

1 Answers  


How do I create a bridge header in swift 4?

1 Answers  


Is apple using swift?

1 Answers  


Explain functions?

1 Answers  


What is category in swift?

1 Answers  


Explain what Lazy stored properties is and when it is useful?

1 Answers  


Categories