Minus ('-') signs suddenly in use at beginning of lines


#1

Starting (I think) in the chapter, i’ve started to see methods start with a ‘-’. I might have just missed this in the book, and if I did I apologize, but I’m not sure why these are used. Any help would be appreciated!


#2

Method signatures always start with a - or a +.

The methods that start with - are instance methods; you trigger them by sending a message to an instance.

The methods that start with + are class methods; you trigger them by sending a message to a class.

You haven’t seen the - before because you’ve never written a method before; you’ve only called methods.


#3

Makes sense!
Thanks for the quick response, sir.