What is init() in swift?



What is init() in swift?..

Answer / Dhawal Goyal

In Swift, `init()` is a special method that is used to initialize an instance of a custom class or struct. It must be declared inside the class or struct definition and called when creating a new instance.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Apple iOS Swift Interview Questions

What are the differences between a struct and a class?

1 Answers  


What is optional chaining?

1 Answers  


What is the difference between nil and none in swift?

1 Answers  


What is difference between any and anyobject in swift?

1 Answers  


What are the advantages of using swift?

1 Answers  


What do you do when you realize that your app is prone to crashing?

1 Answers  


What is string in swift?

1 Answers  


What are the new feature in swift 4.0?

1 Answers  


What is the difference between swift and ‘objective-c’ language?

1 Answers  


How does closure work in swift?

1 Answers  


What is static let in swift?

1 Answers  


What are methods in swift?

1 Answers  


Categories