Skip to content
Java projects 4 min read

Projects

The fastest way to learn Java is to ship something. These eight projects are ordered beginner to advanced — each one introduces a new layer of the platform (collections, OOP, persistence, web, concurrency, networking). Start where you’re comfortable and don’t skip the stretch goals; that’s where the real learning lives.

Treat each project as production code: write tests, handle errors, and commit in small steps. The habits matter more than the feature.

1. CLI To-Do App

What you’ll build: A command-line task manager that lets users add, list, complete, and delete tasks, with state saved between runs.

Key concepts practiced:

  • Parsing command-line arguments and a simple REPL loop
  • enum for task status, record for the task model
  • Reading and writing a file (JSON or plain text)
  • Input validation and user-friendly error messages

Suggested tech / libraries: Plain JDK, picocli for argument parsing, Jackson or Gson for JSON persistence.

Stretch goal: Add due dates, priorities, and a --filter flag that uses the Streams API to query tasks.

2. Bank Account Simulation (OOP)

What you’ll build: A domain model for accounts supporting deposits, withdrawals, transfers, and a transaction history — with overdraft protection.

Key concepts practiced:

  • Encapsulation: private fields, validated mutators
  • Inheritance vs composition (CheckingAccount, SavingsAccount)
  • Custom exceptions (InsufficientFundsException)
  • BigDecimal for money (never double)

Suggested tech / libraries: Plain JDK, JUnit 5 for testing invariants.

Stretch goal: Add interest accrual via a scheduled job and enforce thread-safe transfers between accounts.

Use BigDecimal for currency. Floating-point types cannot represent 0.10 exactly and will silently corrupt balances.

3. Library Management System

What you’ll build: A catalog system to manage books and members, check items in and out, and persist the full state to disk.

Key concepts practiced:

  • Rich use of the Collections framework (Map, Set, List)
  • File persistence via serialization or JSON
  • Search and filtering with streams
  • Modeling relationships (a member borrows many books)

Suggested tech / libraries: Plain JDK collections, Jackson for persistence, JUnit 5.

Stretch goal: Add fine calculation for overdue items and a CSV import/export feature.

4. REST API with Spring Boot

What you’ll build: A production-shaped HTTP API for a resource (e.g. products), with CRUD endpoints, validation, and a real database.

Key concepts practiced:

  • Dependency injection and the controller/service/repository layering
  • DTOs, bean validation, and global exception handling
  • JPA entity mapping and repository queries
  • Writing integration tests against the running context

Suggested tech / libraries: Spring Boot, Spring Web, Spring Data JPA, H2/PostgreSQL, Testcontainers.

Stretch goal: Add pagination, JWT authentication with Spring Security, and OpenAPI docs via springdoc.

5. Multi-threaded File Downloader

What you’ll build: A tool that downloads a large file in parallel chunks using HTTP range requests, then reassembles them.

Key concepts practiced:

  • ExecutorService and Future / CompletableFuture
  • HTTP range requests with java.net.http.HttpClient
  • Coordinating worker threads and aggregating results
  • Progress reporting and graceful cancellation

Suggested tech / libraries: JDK HttpClient, java.util.concurrent, RandomAccessFile for chunk writes.

Stretch goal: Add resume-after-failure by persisting per-chunk progress, and a live progress bar.

6. In-Memory Key-Value Store

What you’ll build: A miniature Redis: a GET/SET/DEL store with TTL expiry, exposed over a simple text protocol.

Key concepts practiced:

  • Thread-safe data structures (ConcurrentHashMap)
  • Background expiry with a ScheduledExecutorService
  • Designing a wire protocol and parsing commands
  • Benchmarking read/write throughput

Suggested tech / libraries: Plain JDK, java.util.concurrent, JMH for benchmarking.

Stretch goal: Add an append-only log for durability and replay it on startup to recover state.

7. Chat Server with Sockets

What you’ll build: A multi-client chat server where messages broadcast to all connected users, plus a matching client.

Key concepts practiced:

  • ServerSocket / Socket and blocking I/O
  • One thread per client, or NIO selectors for scale
  • Broadcasting to shared, thread-safe client lists
  • Clean connection lifecycle and shutdown handling

Suggested tech / libraries: JDK networking, java.util.concurrent; optionally Netty for the advanced version.

Stretch goal: Add private messaging, rooms/channels, and rewrite the I/O layer using non-blocking NIO selectors.

8. JDBC-Backed Inventory System

What you’ll build: An inventory tracker backed by a relational database, with stock levels, suppliers, and reorder alerts — using raw JDBC.

Key concepts practiced:

  • JDBC connections, PreparedStatement, and ResultSet
  • Transactions, commit/rollback, and connection pooling
  • The repository pattern over plain SQL
  • Preventing SQL injection with parameterized queries

Suggested tech / libraries: JDBC, PostgreSQL or SQLite, HikariCP for pooling, Flyway for migrations.

Stretch goal: Add a reporting layer with aggregate SQL queries and export low-stock alerts to a scheduled email job.

Choosing your path

LevelProjectsCore skill unlocked
Beginner1, 2Syntax, OOP, file I/O
Intermediate3, 4Collections, web frameworks, persistence
Advanced5, 6, 7, 8Concurrency, networking, databases

Ship the beginner tier end-to-end before reaching for Spring Boot — frameworks are far easier to reason about once the fundamentals are muscle memory.

Last updated June 1, 2026
Was this helpful?