Câu hỏi phỏng vấn Objective-C
Câu hỏi

What is the difference between NSDictionary and NSMutableDictionary ?

Câu trả lời

Here is the difference between NSDictionary and NSMutableDictionary in Objective-C:

NSDictionary

  • NSDictionary is an immutable collection of key-value pairs.
  • The contents of an NSDictionary cannot be modified after it is created.
  • Adding, removing or changing values in an NSDictionary will result in a compile-time error.
  • NSDictionary is thread-safe and can be safely accessed from multiple threads.
  • NSDictionary is optimized for fast lookup of values by key.

NSMutableDictionary

  • NSMutableDictionary is a mutable subclass of NSDictionary.
  • The contents of an NSMutableDictionary can be modified after it is created.
    -...
middle

middle

Gợi ý câu hỏi phỏng vấn

middle

What is Key-Value-Coding and Key-Value-Observing in Objective-C?

middle

When would you use Categories over Inheritance and vice versa?

senior

What is @autoreleasepool ?

Bình luận

Chưa có bình luận nào

Chưa có bình luận nào