Swift :  function in class
swift : function in class
Android Swift
private int Sumdemo(int a,int b){
			return   a + b;
	}

call it

Sumdemo(3,6);

 

func Sumdemo(a:Int,b:Int)->Int{
        return   a + b;
    
    }

call it

 print("sum==>\(Sumdemo(3, b: 6))")

 

   

 

Comments