Please enable JavaScript to use CodeHS

Introduction to Java (Latte)

Data Structures

In this module, students learn basic data structures in Java including arrays, ArrayLists, 2 dimensional arrays and HashMaps. Data structures will be used to design larger applications.

Lessons

5.1 What are Data Structures?

  • What are Data Structures?
  • Quiz: Data Structures
  • Data Structures Everywhere

5.2 Introduction to Arrays

  • Introduction to Arrays
  • Quiz: Arrays
  • Making an Array
  • Make an Empty Array
  • Indexing Into an Array
  • +3 more

5.3 Using Arrays

  • Using Arrays
  • Quiz: Using Arrays
  • Iterating Over an Array
  • Sum Array
  • Array Out of Bounds
  • +8 more

5.4 ArrayList Methods

  • ArrayLists
  • Quiz: ArrayList
  • Hello World ArrayList
  • ArrayList and Java Primitives
  • ArrayList Size Method
  • +4 more

5.5 Arrays vs ArrayLists

  • Arrays vs ArrayLists
  • Quiz: Arrays vs ArrayList
  • Expanding Array
  • Improving Expanding Array
  • Array vs ArrayList

5.6 The List Interface

  • The List Interface
  • The List Interface Quiz
  • Reverse the List
  • Summer Reading

5.7 2D Arrays (Matrices or Grids)

  • 2D Arrays
  • Quiz: 2D Arrays
  • Nested Loops
  • Ice Cream Combos
  • First 2D Array
  • +3 more

5.8 HashMaps

  • HashMaps
  • Quiz: HashMaps
  • The Phonebook
  • Word Counts

5.9 Binary

  • Number Systems
  • Number Systems Quiz
  • Converting Octal to Decimal
  • Converting Binary to Decimal
  • Using Binary
  • +3 more

5.10 Writing BlackJack

  • The Card Class
  • The Card Class
  • The Deck Class
  • The Deck Class
  • The Hand Class
  • +5 more

5.11 Battleship

  • Battleship Demo
  • Battleship Part 1: The Ship Class
  • Battleship Part 2: The Location Class
  • Battleship Part 3: The Grid Class
  • Battleship Part 4: Adding a Ship to the Grid
  • +5 more

5.12 Unit Quiz

  • Data Structures

Courses that include this module