title: Trouble with NSString and copy attribute
body: <p>I'm learning Objective C with the book "Programming with Objective C", but I'm stuck with the exercises 3 on page 66.</p>
  
  <p>I have the following properties:</p>
  
  <pre><code>@property (copy, readonly) NSString *lastName;
  @property (copy, readonly) NSString *firstName;
  </code></pre>
  
  <p>the following methods:</p>
  
  <pre><code>+ (id) personWithLastName:(NSString *)aLastName andFirstName:(NSString *)aFirstName {
      return [[self alloc] initWithLastName:aLastName andFirstName:aFirstName;
  }
  
  - (id) initWithLastName:(NSString *)aLastName andFirstName:(NSString *)aFirstName {
      self = [super init];
      if (self) {
          _lastName = aLastName;
          _firstName = aFirstName;
      }
      return self;
  }
  
  - (void) sayHello {
      NSString *greeting = [NSString stringWithFormat:@"Hello, %@ %@!", [self firstName], [self lastName]];
      [self saySomething:greeting];
  }
  </code></pre>
  
  <p>and the following code in the main:</p>
  
  <pre><code>NSMutableString *firstName = [NSMutableString stringWithString:@"Steve"];
  NSString *lastName = @"Jobs";
  
  XYZPerson* firstPerson = [XYZPerson personWithLastName:lastName andFirstName:firstName];
  [firstPerson sayHello];
  </code></pre>
  
  <p>which correctly print "Hello, Steve Jobs!".</p>
  
  <p>Later, I added the following lines:</p>
  
  <pre><code>[firstName setString:@"John"];
  [firstPerson sayHello];
  </code></pre>
  
  <p>which edit the property firstName in the object firstPerson, and print "Hello, John Jobs!".
  However, firstName have the copy attribute, so why this happen?</p>