Skip to content
Kevin Lin edited this page Aug 27, 2025 · 1 revision

Why does 373 + 1 evaluate to 374 while "373" + "1" evaluate to "3731"? Underlying this question is the concept of a data type. In Java, every variable has a data type like int or String. Data types combine representation and functionality. An int can only represent integer numbers within a certain range and the plus operator computes the sum of the two values. A String, on the other hand, represents data as a sequence of characters and the plus operator appends the two strings.

Abstract data types (ADTs) are data types that do not specify a single representation of data and only include a specification for the functionality of the data type. In Java, abstract data types are often represented using interfaces like List, Set, or Map. Java provides implementations or specific representations of each interface through classes like ArrayList, TreeSet, or HashMap. All modern software is built with abstractions. Millions of programmers have written code using list types like Java's ArrayList. But have you ever wondered how lists are actually implemented in Java? Someone had to write the code to define the behavior for ArrayList. These lessons will explore how they designed their abstractions.

In software engineering, there's a distinction between being a client of a program versus being an implementer of a program. If you're working with a team of people on a software project, one person on your team might be responsible for writing the client while another person is responsible for writing the implementation. This distinction not only provides a blueprint for dividing a programming project into independent components, but it also allows for abstraction: the idea that we can change the implementation of the program without needing to rewrite all the client code too!

What would programming look like without abstraction?

Without abstraction, everyone who wrote a program using lists would have to go back and fix their code by copying-and-pasting updates every time the Java developers issue a fix for the list data type. There are millions of people using Java, and many of them use lists. Software development would grind to a halt if every update to Java required everyone who used a list to also make many changes.

Lessons are intended to be read in the following order:

  1. Dynamic Arrays
  2. Linked Nodes
  3. Asymptotic Analysis
  4. Iterative Sorts
  5. Binary Search
  6. Merge Sort
  7. Binary Search Trees
  8. Tries
  9. 2–3 Trees
  10. Left-Leaning Red-Black Trees
  11. Quicksort
  12. Counting Sorts
  13. Binary Heaps
  14. Hash Tables
  15. Affordance Analysis
  16. Graph Data Type
  17. Graph Traversals
  18. Shortest Paths Trees
  19. Problems and Solutions
  20. Topological Sorting
  21. Dynamic Programming
  22. Minimum Spanning Trees
  23. Disjoint Sets

Clone this wiki locally