How to access public instance variable in Objective C?
<p>I am having following condition:</p>

<pre><code>@interface MyClass:NSObject
    @public NSString *str;
@end

@implementation 
-(id)init{ 

}

@end
</code></pre>

<p>Now i want to access str variable outside MyClass in Other Class, (1) Using MyClass Object (2) without using MyClass Object, How can i achieve that ?? </p>
