Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 9. Using Arrays and Dictionaries > Accessing Array Elements

Accessing Array Elements

You created an array in the previous task. Now how do you access individual elements in that array? For example, what if you want to access the element at array[0]?

To do that, you send the array an objectAtIndex message along with the index value you want to access:


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial