Running on Java 26-ea+12-1260 (Preview)
Home of The JavaSpecialists' Newsletter

Practical Refactoring to Modern Java Course

How to use the many new Java features that have been added since Java 11

Using Java 25

Duration of 1 Day


A fast, hands-on refactoring workshop for experienced Java developers who haven't yet adopted Java 11-25 features. For each feature, we give a crisp "what/why," then immediately modernize real ERP code to show concrete benefits: safer hierarchies, cleaner APIs, leaner strings, smarter patterns, and simpler imports. You'll leave with a repeatable checklist to upgrade legacy codebases pragmatically and safely.

  • Real-World Refactoring, Not Toy Examples: Modern Java features are applied to a legacy ERP system, demonstrating how to improve production-grade code - not just contrived code snippets.
  • Fast-Paced, Feature-Rich, Hands-On: Covers 16 major enhancements from Java 10 to 25 in just 1 day, with short focused refactoring exercises that cement understanding through direct application.
  • Designed for Busy Professionals: Zero fluff, just practical modernization - ideal for experienced Java developers who need a guided tour of Java's evolution without wading through specifications or reading dozens of blog posts.

By the end of this class, you'll be able to:

  • Systematically modernize legacy ERP code by applying Java 11-25 features in-place (e.g., var, text blocks, switch expressions, records, instanceof/record/switch pattern matching, sequenced collections).
  • Redesign data and type hierarchies using records and sealed classes, then leverage exhaustive pattern matching to simplify business logic and eliminate casts/fallthrough bugs.
  • Streamline pipelines and APIs with Stream Gatherers and unnamed variables/patterns, reducing incidental complexity in service, finder, and rendering layers.
  • Adopt Java 25 ergonomics safely at scale-validate early with flexible constructor bodies (JEP 513), use instance main/IO where suitable (JEP 512), and employ module import declarations (JEP 511) while avoiding name ambiguities.

General Enquiry


Prerequisites

This course is ideally suited to the professional Java programmer who is already very familiar with older Java syntax.

  • Required Experience: At least two years of professional Java programming.

Pricing Options

We have several options for you to join this course:

1. Virtual In-house Course:

Presented via video conference to your team of programmers by the author of the course. Price is €4490 for up to 10 students, above that is an additional €449 per student.

  • Example 1: Course with 8 students taught remotely via video conference, price is €4490. Price per student is €561.
  • Example 2: Course with 12 students taught remotely via video conference, price is €5388. Price per student is €449.
  • Example 3: Course with 24 students taught remotely via video conference, price is €10776. Price per student is €449.

Please contact us if you have any questions.

2. In-person In-house Course:

Presented at your company in-person by one of our Certified JavaSpecialist Instructors. Price is €6610 for up to 10 students, above that is an additional €661 per student, plus the travel expenses of the instructor. Note that for in-person in-house courses, we need a minimum of three consecutive training days.

  • Example 1: Course with 8 students taught on-site at your company, price is €6610. Price per student is €826.
  • Example 2: Course with 12 students taught on-site at your company, price is €7932. Price per student is €661.
  • Example 3: Course with 18 students taught on-site at your company, price is €11898. Price per student is €661.

Please contact us if you have any questions.

2. Open Enrollment Classroom Course:

We occasionally offer this course as a classroom course in Chania on the Island of Crete. Price for the course is €1322 per student.

We also offer this course as an open enrollment live remote course that you can attend from anywhere. Price is €895 per student.

Please contact us if you have would like to make a booking or if you have any questions.

4. Self-Paced Course:

This course is currently not available as a self-paced course.

Please contact us if you have any questions.

* Prices exclude EU VAT and withholding taxes where applicable. Please contact us for an exact quote for your country.

Open Courses

All our courses are offered as in-house courses. Please contact us on heinz@javaspecialists.eu.

Location Dates Presenter Language Fees

* Price is excluding EU VAT where applicable. Please contact us for an exact quote for your country.

Detailed Outline

Part 0: Welcome
Session 1 - Readability & Brevity (Java 10-15)
  • Local variable type inference (var) - JEP 286/323
    • Goal: Reduce noise; discuss when not to use var.
  • String.repeat() - Java 11
    • Goal: Replace manual loops/joins for repeated chars.
  • Switch expressions - JEP 361 (Java 14)
    • Goal: Eliminate fallthrough bugs; return values from switch.
  • Text blocks - JEP 378 (Java 15)
    • Goal: Readable multi-line strings without escaping.
Session 2 - Lightweight Data & Safer Hierarchies (Java 16-18)
  • Records - JEP 395 (Java 16)
    • Goal: Remove boilerplate; discuss encapsulation trade-offs.
  • Pattern matching for instanceof - JEP 394 (Java 16)
    • Goal: Inline safe casts; reduce duplication.
  • Sealed classes - JEP 409 (Java 17)
    • Goal: Constrain subtypes; expose hierarchy bugs early.
  • Code snippets in Javadoc - JEP 413 (Java 18)
    • Goal: Use {@snippet ...} for accurate, styled examples.
Session 3 - Collections & Pattern Power (Java 21-22)
  • Sequenced collections - JEP 431 (Java 21)
    • Goal: Replace get(0)/size()-1 with getFirst()/getLast(); unify deque/list APIs.
  • Record patterns - JEP 440 (Java 21)
    • Goal: Deconstruct records directly in conditionals.
  • Pattern matching for switch - JEP 441 (Java 21)
    • Goal: Replace cascaded instanceof ladders with concise switch.
  • Unnamed variables & patterns - JEP 456 (Java 22)
    • Goal: Use _ for ignored lambda params / record components.
Session 4 - Pipelines, Constructors & Modules (Java 24-25)
  • Stream Gatherers - JEP 485 (Java 24)
    • Goal: Custom mid-stream logic (stateful transforms, error handling).
  • Flexible constructor bodies - JEP 513 (Java 25)
    • Goal: Validate/assign before super()
  • Compact source & instance main + IO - JEP 512 (Java 25)
    • Goal: Understand compact demos; adopt IO for cleaner output.
  • Module import declarations - JEP 511 (Java 25)
    • Goal: Import entire modules; manage ambiguities (java.util.Date vs java.sql.Date).

About the Author

Heinz Kabutz Java Conference Speaker

Java Champion, author of the Javaspecialists Newsletter, conference speaking regular... About Heinz

Superpack

Java Specialists Superpack Our entire Java Specialists Training in one huge bundle more...

Free Java Book

Dynamic Proxies in Java Book

110% Money-back Guarantee

Should you not be satisfied with the quality of the training or the delivery, we will gladly refund you 100% of the course fees. This needs to be brought to our attention within the first 4 hours of the course and a chance should be given to correct whatever you are not satisfied with. If you are still not satisfied, we will refund you 100% of the course fees, plus we will pay our own travel expenses. The training material then remains the property of JavaSpecialists.EU.


Cancellation Policy

If the course is cancelled more than two weeks before the start of the course, a 10% cancellation fee of the fees will apply, plus any non-refundable travel expenses incurred by the trainer.

If the course is cancelled within two weeks of the start of the course, a 50% cancellation fee of the fees will apply, plus any non-refundable travel expenses incurred by the trainer.

No refund will be given to cancellations during the course.


Java Training

We deliver relevant courses, by top Java developers to produce more resourceful and efficient programmers within their organisations.

Java Consulting

We can help make your Java application run faster and trouble-shoot concurrency and performance bugs...