Skip to Main Content
Beginning Java 8 Fundamentals: Language Syntax, Arrays, Data Types, Objects, and Regular Expressions
book

Beginning Java 8 Fundamentals: Language Syntax, Arrays, Data Types, Objects, and Regular Expressions

by Kishori Sharan
June 2014
Beginner content levelBeginner
810 pages
23h 28m
English
Apress
Content preview from Beginning Java 8 Fundamentals: Language Syntax, Arrays, Data Types, Objects, and Regular Expressions

CHAPTER 15

image

Arrays

In this chapter, you will learn:

  • How to declare array variables
  • 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 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

What Is an Array?

An array is a fixed-length data structure that is used to hold more than one value of the same data type. Let’s consider an example, which will explain ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Beginning Java 9 Fundamentals: Arrays, Objects, Modules, JShell, and Regular Expressions

Beginning Java 9 Fundamentals: Arrays, Objects, Modules, JShell, and Regular Expressions

Kishori Sharan

Publisher Resources

ISBN: 9781430266532Purchase book