2.3. Java Arrays¶
2.3.1. Objectives¶
Trace code that uses arrays
Write code to create and process arrays including finding a sum, average, max, and min values
Trace and write code to perform a linear search on an array
Trace and write code to insert or remove an item anywhere in an array
2.3.2. Interactive: Java Array Basics¶
Follow Along, Practice and Explore
ArrayBasics.java
- Download to run and explore the java file (see below) from the video on your own in eclipse. You may download the standalone *.java file for this example. To run the standalone *.java file you will need to
create a new Eclipse project, then
create a package within the project called “example” (the package named at the top of the class MUST match the package the file is placed in within the Eclipse project), and finally
download and import the standalone *.java file(s) to the created package.
2.3.3. Checkpoint 1¶
2.3.4. Programming Practice: Java Arrays 1¶
2.3.5. Interactive: Java Array Search¶
Follow Along, Practice and Explore
ArrayLinearSearch.java
- Download to run and explore the java file (see below) from the video on your own in eclipse. You may download the standalone *.java file for this example. To run the standalone *.java file you will need to
create a new Eclipse project, then
create a package within the project called “example” (the package named at the top of the class MUST match the package the file is placed in within the Eclipse project), and finally
download and import the standalone *.java file(s) to the created package.
2.3.6. Checkpoint 2¶
2.3.7. Interactive: Java Array Removing, Inserting, & Tips¶
Follow Along, Practice and Explore
ArrayRemove.java ArrayInsert.java
- Download to run and explore the java files (see below) from the video on your own in eclipse. You may download the standalone *.java file for this example. To run the standalone *.java file you will need to
create a new Eclipse project, then
create a package within the project called “example” (the package named at the top of the class MUST match the package the file is placed in within the Eclipse project), and finally
download and import the standalone *.java file(s) to the created package.