© Kishori Sharan and Adam L. Davis 2022
K. Sharan, A. L. DavisBeginning Java 17 Fundamentalshttps://doi.org/10.1007/978-1-4842-7307-4_19

19. Arrays

Kishori Sharan1   and Adam L. Davis2
(1)
Montgomery, AL, USA
(2)
Oviedo, FL, USA
 
In this chapter, you will learn:
  • How to declare variables of array type

  • How to create arrays

  • How to access elements of an array

  • How to use a for loop and a for-each loop to iterate through elements of an array

  • How to copy elements of one array to another array

  • How to copy primitive- and reference-type arrays

  • How to use multidimensional arrays

  • How to use an ArrayList when a variable-length array is needed

  • How to convert elements of an ArrayList to an array and vice versa

  • How to perform array-related operations such as sorting elements ...

Get Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 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.