An array is a fundamental datastructure category, and a building block for more complex datastructures. In this second part of my Java 101 introduction to datastructures and algorithms, you will learn how arrays are understood and used in Java programming. I introduce the concept of an array and how arrays are represented in the Java language. Then you’ll learn about one-dimensional arrays and the three ways that you can introduce them to your Java programs. Finally, we’ll explore five algorithms used to search and sort one-dimensional arrays.
Note that this article builds on Datastructures and algorithms, Part 1, which introduces the theoretical side of datastructures and the algorithms associated with them. That article includes an in-depth discussion of algorithms and how to use space and time complexity factors to evaluate and select the most efficient algorithm for your Java program. This article will be much more hands-on, and assumes you have already read and digested Part 1.
Source: New feed