Multiple choice technology

which among the following is the correct way of method declaration

  1. -(void)setPrice:(float)newPrice;

  2. -(void)setPrice:float newPrice;

  3. -void setPrice:(float)newPrice;

  4. -void setPrice:float newPrice;

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

Objective-C method declarations require the return type in parentheses after the minus sign. The correct syntax is -(returnType)methodName:(parameterType)parameterName;