Swift Introduction

Swift is a new programming language developed by Apple Inc for iOS and OS X development. Swift adopts the best of C and Objective-C, without the constraints of C compatibility. Swift uses the same runtime as the existing Objective-c system on Mac OS and iOS, which enables Swift programs to run on many existing iOS and OS X platforms.

Swift comes with a playground feature where Swift programmers can write their code and execute it to see the results immediately.

Features of Swift

First Swift Program

The following program demonstrates the basic syntax of Swift. This program outputs Hello Welcome to balututorial.com on the screen. If you want to run this program on your computer, make sure that Swift and Xcode is properly installed

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
import UIKit
print("Hello Welcome to balututorial.com")
import UIKit print("Hello Welcome to balututorial.com")
import UIKit 
print("Hello Welcome to balututorial.com")

When you run the program, the output will be: Hello Welcome to balututorial.com

How Swift Program Works?

Points to remember?