title: What are Setters and Getters?
body: <p>I don't really have a solid understanding of Setters and Getters for objective-c. Can someone provide a good guide for beginners? I noticed that this comes into play when trying to access variables in another class, which I am trying to do right now. I have two classes, lets say A and B. I have a NSString variable in A with the @property (retain) NSString *variable. Then I go ahead and synthesize it. Now when the view loads in the class I set the value for the variable to "hello". Now what I want to do is access the string from class B. I have imported the the class A, and initialized it with this code:</p>
  
  <pre><code>AClass *class = [[AClass alloc] init];
  NSLog(@"Value:%@", class.variable);
  [class release];
  </code></pre>
  
  <p>However in the debugger it returns a value of "(null)", which I don't really understand. If someone could lead me into the right path I would greatly appreciate it.</p>
  
  <p>Thanks,</p>
  
  <p>Kevin</p>