Get Fundamentals Of Swift Programming Language

What is Swift programming language?

Swift programming language is the best language to develop iOS Applications and Mac OS X Applications. It is a new programming language, which was introduced by Apple with the new features listed below.
  1. A programmer writes our code and it immediately executes.
  2. Swift has syntax like objective-C.
  3. Swift uses existing Cocoa Frameworks.
  4. Swift is safe and has a safe programming pattern.
Swift programming comes from the various popular programming languages like Python, Ruby and C# etc.

Syntax of Swift programming language is given below.
  1. import Cocoa
  2. var srt1 = "Hello, World!"
  3. println(str1)
Syntax of Swift programming language is very similar to Python programming. Swift provides a range of built-in data types to store the values.

They are listed below.
  1. Int
  2. Float
  3. Double
  4. String
  5. Character
  6. Optional
Decision making statement

Swift programming language has many decision making statements like C programming language, which are given below.
  1. if statement
  2. if else statement
  3. leader if else statement
  4. nested if statement
  5. switch statement
Types of looping statement in Swift are given below.
  1. for-in loop
  2. for loop
  3. while loop
  4. do while loop
Data structures in Swift are given below.
  1. String
  2. Array
  3. Structure
  4. Enumeration
Object orientation in Swift programming language

Swift is an object oriented programming language.

Swift supports the following
  1. classes
  2. inheritance
Swift programming language also supports Dictionaries.

Dictionaries are the special type data types, which accept the key and value pair.
Ebook Download
View all
Learn
View all