E.13. Wrap-Up

This appendix began our introduction to data structures, exploring the use of arrays to store data in and retrieve data from lists and tables of values. The appendix examples demonstrated how to declare an array, initialize an array and refer to individual elements of an array. The appendix introduced the enhanced for statement to iterate through arrays. We used exception handling to test for ArrayIndexOutOfBoundsExceptions that occur when a program attempts to access an array element outside the bounds of an array. We also illustrated how to pass arrays to methods and how to declare and manipulate multidimensional arrays.

We introduced the ArrayList<T> generic collection, which provides all the functionality and performance of ...

Get Android™ How to Program, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.