CHAPTER 49 — Methods that Change Arrays

Classic programmed-learning exercises, refreshed for modern Java and presented in the current MrStyner.com portfolio style.

Modern Java noteThis archive has been refreshed for Java 25 LTS. Core language concepts remain useful, while outdated setup instructions and browser-era Java are labeled or replaced. Java 26 is the current feature release; Java 25 is used here as the stable teaching baseline.
go to home page   go to next page

created: 11/27/98; revised: 11/27/99, 01/24/00, 07/20/02, 05/29/03, 02/03/06

CHAPTER 49 — Methods that Change Arrays

A method can change the values of elements in an array that has been passed to it as a parameter. Often a method rearranges the data in an array or alters selected elements.

Chapter Topics:

  • Review of parameter passing with int variables
  • Parameter passing with array reference variables
  • A method to zero an array
  • A method to copy one array to another

QUESTION 1:

(Review Question:) what types of data can be held in the elements of an array?