© Kishori Sharan 2017
Kishori SharanBeginning Java 9 Fundamentalshttps://doi.org/10.1007/978-1-4842-2902-6_19

19. Arrays

Kishori Sharan
(1)
Montgomery, Alabama, USA
 
In this chapter, you will learn:
  • How to declare variable variables of array types
  • 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 types arrays
  • How to use multi-dimensional 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 of an array, comparing two arrays, performing binary ...

Get Beginning Java 9 Fundamentals: Arrays, Objects, Modules, JShell, and Regular Expressions now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.