方法中(+),(-)的区分

(-)An instance method is a method whose execution is scoped to a particular instance of the class. In other words, before you call an instance method, you must first create an instance of the class. Instance methods are the most common type of method.

 

 

(+)A class method is a method whose execution is scoped to the method’s class. It does not require an instance of an object to be the receiver of a message.

posted @ 2012-04-25 17:38  进劲  阅读(227)  评论(0编辑  收藏  举报