Mention what is the characteristics of Switch in Swift?



Mention what is the characteristics of Switch in Swift?..

Answer / iosraj

It supports any kind of data, and not only synchronize but also checks for equality

When a case is matched in switch, the program exists from the switch case and does not continue checking next cases. So you don’t need to explicitly break out the switch at the end of case

Switch statement must be exhaustive, which means that you have to cover all possible values for your variable

There is no fallthrough in switch statements and therefore break is not required

Is This Answer Correct ?    4 Yes 0 No

Post New Answer

More Apple iOS Swift Interview Questions

What is lazy in swift?

0 Answers  


Explain some common execution states in ios?

0 Answers  


Can enum conform to swift protocol?

0 Answers  


What are swift categories?

0 Answers  


Consider the following code: var defaults = NSUserDefaults.standardUserDefaults() var userPref = defaults.stringForKey("userPref")! printString(userPref) func printString(string: String) { println(string) } Where is the bug? What does this bug cause? What’s the proper way to fix it?

1 Answers  






Explain grand central dispatch (gdc).

0 Answers  


What is swift? How is it different from objective-c?

0 Answers  


What are regular expression and responder chain in swift?

0 Answers  


What is floating point number in swift?

0 Answers  


Is swift a good language?

0 Answers  


Why swift is faster?

0 Answers  


What is optional binding?

0 Answers  


Categories