How to get String value in iphone
<p>I have a class A and a Class B 
Class A has a method and NSString as return type 
 as shown below
Class A:</p>

<pre><code>NSString *hello; 
hello =[[NSString alloc]initWithString:[self method:stringname]];
-(NSString*)method:stringname {

return String123; 
}
</code></pre>

<p>Now in Class B :</p>

<pre><code>NSString *hello1; 
hello1 =[[NSString alloc]initWithString:objA.hello];
NSLog("hello1 %@",hello1);
</code></pre>

<p>here i get the value as null the value is printed in Class A but not in Class B
rest everything @proprty and @synthesize is added </p>

<p>can any one tell me what is the correct ans for the above code</p>
