Публікації

Objective-C Test 2018

1. What is a category? Answers: • A namespace • A category is a way to add instance variables to a class which already exists • A category is a group of classes • A category is a way to add methods to a class which already exists • None of the above 2. Is the following code a correct allocation? MyClass myObj; [&myObj aMessage]; Answers: • Yes • No 3. What is the default visibility for instance variables? Answers: • @private • @package • @public • @protected • None of the above 4. Which of the following creates a class that conforms to a protocol? Answers: • @interface ClassName [ProtocolName] • @interface ClassName <ProtocolName> • @interface ClassName < ProtocolName • @interface ClassName::ProtocolName • @interface ClassName(ProtocolName) 5. What is nil? Answers: • The null object • The null class • It doesn’t exist • None of the above 6. What is not supported in Obj-C? Answers: • Recursive method call • Variable a
Останні дописи