Function different Java and swift

 

Java Swift
void myFunc() {
    print("Hello !")
}

 

func myFunc() {
    print("Hello !")
}

 

// Call it
myFunc()
// Call it
myFunc()

 

Comments