Session 13 Swift IOS Code

IOS Mobile Application Development        

Session 13 Swift IOS Code

//classvsStruct
class Person 
{
 var clothes : String
 var shoes : String 

init(clothes: String, shoes: String)
{
self.clothes = clothes
self.shoes = shoes
}
}
  
let fahad = Person(clothes: "shirts", shoes: "Bata")
let hussain = Person(clothes: "short Shirts", shoes: "Servies") 

No comments:

Post a Comment

Fell free to write your query in comment. Your Comments will be fully encouraged.