Official Forum for Programming in Objective-C (the iPhone Programming Language) - Stephen Kochan
October 17, 2018, 08:08:24 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register Chat  
Pages: [1]   Go Down
  Print  
Author Topic: "Return" Problems  (Read 953 times)
lukenewman
Newbie
*
Posts: 7


« on: September 14, 2011, 04:15:02 PM »

I'm absolutely new to Objective-C and I just can't wrap my head around the concept of "returning" a variable. I have a little experience in Java so if an explanation using Java syntax was provided I would be quite happy.
Logged
dharr19
Full Member
***
Posts: 175


Email
« Reply #1 on: September 14, 2011, 05:37:01 PM »

Code: (Objective-C)
public class AddressBook
{
       private String addressBookName;

       public void setaddressBookName (String name)
       {
                  addressBookName = name;
       }

       public String getaddressBookName()  
       {
                 return addressBookName        
       }

       other code stuff here
}

So in objective-c return works in much the same way.  Let me know if this is what you meant.  If not I have another example.

Cheers
David
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Entire forum contents ゥ 2009 classroomM.com. All rights reserved.