Question from the Objective-C test

Is the following code valid Objective-C? @interface MyClass : NSObject - (void)myMethod; @end @implementation MyClass - (void)myMethod { NSLog(@"Hello, world!"); } @end