The Swift Programming Language guide has the following example:
class Person {
let name: String
init(name: String) { self.name = name }
var apar
John is an optional Person, meaning it can hold a value or be nil.
john.apartment = number73
is used if john is not an optional. Since john is never nil we can be sure it won't call apartment on a nil value. While
john!.apartment = number73
promises the compiler that john is not nil then unwraps the optional to get john's value and accesses john's apartment property. Use this if you know that john is not nil. If you call this on a nil optional, you'll get a runtime error.
The documentation includes a nice example for using this where convertedNumber is an optional.
if convertedNumber {
println("\(possibleNumber) has an integer value of \(convertedNumber!)")
} else {
println("\(possibleNumber) could not be converted to an integer")
}