Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


What is Initialization ?



What is Initialization ?..

Answer / iosraj

As per Apple's Docs

Initialization is the process of preparing an instance of a class, structure, or enumeration for use. This process involves setting an initial value for each stored property on that instance and performing any other setup or initialization that is required before the new instance is ready for use.

You implement this initialization process by defining initializers, which are like special methods that can be called to create a new instance of a particular type. Unlike Objective-C initializers, Swift initializers do not return a value. Their primary role is to ensure that new instances of a type are correctly initialized before they are used for the first time.

Initializers

Initializers are called to create a new instance of a particular type. In its simplest form, an initializer is like an instance method with no parameters, written using the init keyword:

init() {

// perform some initialization here

}

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Apple iOS Swift Interview Questions

Is swift dynamic or static?

0 Answers  


What is the usage of switch statement in swift language?

0 Answers  


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

0 Answers  


What is forced unwrapping? Why is it potentially unsafe?

0 Answers  


What lazy stored properties is and when it is useful?

0 Answers  


What is observer in swift?

0 Answers  


What is hashable in swift?

0 Answers  


Can you make a property optional?

0 Answers  


What is category in swift?

0 Answers  


What is benefit of using higher order functions?

0 Answers  


Mention what are the type of integers does Swift have?

1 Answers  


Do swift classes inherit from nsobject?

0 Answers  


Categories