Java-27

Java Practice

Learn how to write Java programs step by step, one module at a time, with each module building on the last.

java 27java 27
Module 1

Data & Decisions

Learn the building blocks of Java: working with numbers and text, making decisions, and organising data in lists and maps.

4
About this challenge

Price parcels from the depot's rate card in whole numbers: a box's volumetric weight, the chargeable kilos rounded up, a yearly forecast that does not overflow, and a price label in euros.

About this challenge

Decide what each kind of parcel costs and whether the depot can take it, with a switch over a sealed interface of records and rules checked in a defined order.

About this challenge

Plan a delivery van's day from its stops: parcels per zone in alphabetical order, express stops first, and the loading order that puts the last stop in first, without changing the list you are given.

About this challenge

Turn a night's shipments into the morning dispatch report, writing every piece yourself: chargeable kilos rounded up, base fees and parcel rules checked in order, the delivery order, and the day's revenue.

Module 2

Objects & Errors

Learn how to design your own types in Java and handle errors: records that check their data, enums for statuses, classes that protect their data, and exceptions.

4
About this challenge

Make a tracking number that cannot exist in a bad state: a record that checks its country and number, reads text like DE-004211 with a flexible constructor, prints itself back the same way, and checks text without throwing.

About this challenge

Model a parcel's journey as an enum: readable labels, final statuses, the moves each status allows, refused jumps, and a count of every status in declaration order.

About this challenge

Keep business accounts inside their credit limit: an interface with a default method, a class whose balance only changes through its methods, a checked exception that says how far over a charge went, and an Optional lookup by id.

About this challenge

Replay a day of scans at the tracking desk, writing every piece yourself: tracking numbers that clean and check themselves, statuses that allow only legal moves, accounts that stay within their credit limit, and a desk that lists every failure with its line number.

Module 3

Streams & Lambdas

Learn how to process data in Java without writing loops: lambdas, method references, streams that filter, group and add up, and gatherers for running totals and windows.

4
About this challenge

Turn the depot's delivery rules into small pieces of code you can pass around: a lambda for late deliveries, rules joined with and, a ranking built from method references, and the worst delay of the week through an Optional.

About this challenge

Answer the zone leads' weekly questions with collectors: revenue per zone in alphabetical order, the late parcels of every zone, late against on time, and the latest delivery day per zone.

About this challenge

Follow the depot's numbers day by day: every stop on every route once, a running revenue total, rolling late counts, weekly totals that keep a short last week, and the clean start before the first late day.

About this challenge

Turn a week of deliveries into the weekly report, writing every piece yourself: a rule for late express parcels, a ranking by delay, revenue per zone, a running total day by day, and the busiest zone.

Frequently asked questions

4

What will I practice in this path?

3 modules: Data & Decisions, Objects & Errors and Streams & Lambdas.

How many challenges are there, and how hard are they?

12 challenges, all easy.

What does this path run on?

Challenges run on java 27.

Do I need to install anything?

No. Every challenge runs in a browser-based IDE with everything already set up, and your code is graded automatically against a test suite.

We use cookies that are necessary to run Staffcoder, and optional analytics cookies to see which pages get used. Analytics stays off unless you accept. Read our Cookie Policy.