watch this if you don't get TDD

Опубликовано: 11 Июнь 2025
на канале: Jack Hodkinson
2,130
87

A practical example of applying test driven development (TDD) in Java to implement the ArrayList, an iconic data structure. TDD involves writing unit tests for your application before writing the production implementation.

Java's ArrayList is a "resizable array" implementation of the List interface. Today I live code a simple implementation of the ArrayList in Java with TDD to demonstrate how the ArrayList uses fixed length arrays to support resizable list semantics, and how to use test driven development to write better source code and unit tests.

Using JUnit 5, AssertJ, and commons-lang3.

The source code used in this tutorial is available for free on GitHub: https://github.com/jrhodkinson/youtub...

You can support me on Patreon:   / jackhodkinson  

00:00 Introduction
00:39 Project set up
01:08 Overview of ArrayList
03:42 What is TDD?
04:45 Coding start!