Amazon.com Widgets "Return" Problems
Welcome, Guest. Please login or register.
Did you miss your activation email?
May 21, 2013, 05:21:28 PM
Home Help Search chat Login Register   
News: Read this please.The Great Kangaroo Escape Looking for reviews of the 4th ed on Amazon!   Twitter:  @skochan
                     

+  Official Forum for Programming in Objective-C (the iPhone Programming Language) - Stephen Kochan
|-+  Old Stuff
| |-+  Newbie Corner
| | |-+  "Return" Problems
Pages: [1]   Go Down
Print
Author Topic: "Return" Problems  (Read 289 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:  



Login with username, password and session length

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 (c) 2009 classroomM.com. All rights reserved.