Java SE 8 Programmer II study materials
Java SE 8 Programmer II study resources

Java SE 8 Programmer II case studies

Java SE 8 Programmer II · Put your knowledge to work in context.

The Java SE 8 Programmer II credential (exam code 1Z0-809, often called OCP Java SE 8) is Oracle's professional-level certification for developers who already write Java and want to prove they can build real applications with the Java SE 8 platform. It is aimed at working programmers, bootcamp graduates, and backend engineers who are comfortable with core syntax and want to demonstrate fluency in the features that define modern Java: lambdas, streams, the Date/Time API, NIO.2, concurrency utilities, and JDBC. The Java SE 8 Programmer II case studies are 5 cases and about 4,143 words.

1

Oversell, a Stuck Shutdown Flag, and a Lock-Order Deadlock in One Reservation Service

ShopFront's reservation service runs on an 8-core node behind a 32-thread cached pool. Under a load test of 200 concurrent checkout requests against a single hot SKU with stock 50, the service sold 51 units: a ConcurrentHashMap<String,Integer stock map is read with get , compared, then written with put inside a helper method that is not synchronized, and an admin restock endpoint writes to the same map directly.

864 words, about 4 min
2

A Parallel Stream That Loses Rows and Starves the Common ForkJoinPool

The analytics team rewrote the nightly report from loops to streams: orders.parallelStream().filter(o - o.total() 100).sorted(comparing(Order::date)).forEach(o - results.add(o)) , where results is a plain ArrayList . On a 16-core box with 120,000 orders, roughly 1,100 rows vanish per run and the list occasionally contains nulls.

807 words, about 4 min
3

Raw Types, Inconsistent compareTo, and a Mutable HashMap Key in a Shared Library

A platform library is in review before release. Catalog declares void importAll(List<?

805 words, about 4 min
4

A 50,000-Row JDBC Import That Leaks Connections and Commits Partially

The fulfillment team's nightly import loads 50,000 rows into ORDERS and roughly 150,000 into ORDER LINE from a CSV, using a 10-connection HikariCP pool. Current code borrows a connection for each row, leaves autocommit on, builds a new PreparedStatement per row, calls executeUpdate , and closes the connection only on the happy path.

864 words, about 4 min
5

A Daily 02:30 Billing Job Across DST, Plus a Week-Based-Year Format Bug

RevOps runs a billing scheduler that should fire once a day at 02:30 local time for the America/New York region, producing about 40,000 invoices per cycle. It builds a LocalDateTime from LocalDateTime.now() , stores the scheduled time in a TIMESTAMP WITHOUT TIME ZONE column, and compares with isBefore(now) on startup plus a 60-second poll.

803 words, about 4 min