How base-class is defined in Swift?
Answer / iosraj
In Swift the classes are not inherited from the base class and the classes that you define without specifying its superclass, automatically becomes the base-class.
| Is This Answer Correct ? | 0 Yes | 1 No |
Mention what is the Floating point numbers and what are the types of floating number in Swift?
What are the different floating point numbers in swift?
struct Planet { var name: String var distanceFromSun: Double } let planets = [ Planet(name: "Mercury", distanceFromSun: 0.387), Planet(name: "Venus", distanceFromSun: 0.722), Planet(name: "Earth", distanceFromSun: 1.0), Planet(name: "Mars", distanceFromSun: 1.52), Planet(name: "Jupiter", distanceFromSun: 5.20), Planet(name: "Saturn", distanceFromSun: 9.58), Planet(name: "Uranus", distanceFromSun: 19.2), Planet(name: "Neptune", distanceFromSun: 30.1) ] let result1 = planets.map { $0.name } let result2 = planets.reduce(0) { $0 + $1.distanceFromSun } What are the types and values of the result1 and result2 variables? Explain why.
Consider the following code: let op1: Int = 1 let op2: UInt = 2 let op3: Double = 3.34 var result = op1 + op2 + op3 Where is the error and why? How can it be fixed?
What is the use of static keyword in swift?
What is framework in swift?
What are the type of integers does swift have?
In swift what is use of backticks while declaring a variable?
How should errors be handled in swift?
What is swift stand for?
What is swift nsarray?
Do try catch swift?