Please enable JavaScript.
Coggle requires JavaScript to display documents.
Data Structures - Coggle Diagram
Data Structures
Array
-
A glaring limitation of arrays is that they can’t adjust in size to accommodate more or fewer elements. You can’t add new elements to an array that’s already full. One data structure you’ll learn about in this lesson, array lists, does not have this limitation.
Unlike the data structures provided by the java.util package, arrays are considered such a core component of Java that they are implemented in the language itself. Therefore, you can use arrays in Java without using an object to hold their data.
BitSet
The BitSet class implements a group of bits, or flags, that can be set and cleared individually. This class is useful when you need to keep up with a set of Boolean values;
-
ArrayList
The ArrayList class is similar to an array, except that it can grow as necessary to accommodate new elements, and it also can shrink.
The nice thing about using an array list is that you aren’t required to give it a specific size upon creation; it shrinks and grows automatically as needed.
Stack
-
You can think of a stack as a vertical stack of objects. When you add a new element, it’s stacked on top of the others
HashMap
The HashMap class implements Dictionary, an abstract class that defines a data structure for mapping keys to values
-
Oracle that has more than 4,400 classes you can use in your own Java programs
Bit sets, which hold Boolean values
Array lists, which are arrays that can grow and shrink in size
Stacks, which are structures stored in last-in, first-out (LIFO) order
Hash maps, which store items using keys
-
The Iterator interface itself isn’t a data structure, but it defines a means to retrieve successive elements from a data structure
-
The Iterator interface provides a standard means of progressing through a list of elements in a defined sequence, which is a common task for many data structures.
The hasNext()method determines whether the structure contains more elements. You can call this method to see whether you can continue iterating through a structure.