What happens when you invoke a method on a nil pointer?



What happens when you invoke a method on a nil pointer?..

Answer / Anurag Verma

In Swift, invoking a method on a `nil` (null) object results in a runtime error called a `fatalError`. This error occurs because you cannot call a method on an object that doesn't exist.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Apple iOS Interview Questions

What is posing in iOS?

1 Answers   B-Ways TecnoSoft,


How to represent layer objects in iOS operating system ?

1 Answers   TryTechnicals Pvt Ltd,


Explain what is storyboard?

1 Answers  


What is meaning of 'assign' keyword?

1 Answers  


What’s the difference between mkannotation and mkpointannotation?

1 Answers  


What are the different store migration options? When are they used?

1 Answers  


What is the use of 'dynamic' keyword?

1 Answers  


Explain application sandboxing.

1 Answers  


What is delegate?

1 Answers  


What are the benefits of ios?

1 Answers  


Introduction to iphone application development?

1 Answers  


What is the difference between cocoa and cocoa touch?

1 Answers  


Categories