Duke’s Star Trek with Java 17 Code Challenges
summary
Walks through concrete JDK 6–17 puzzles with runnable code and answers: shows a Deque push/pop sequence that yields a surprising element order, explains try-with-resources close order when open throws, demonstrates stream laziness with peek+limit, proves lambdas require effectively final variables so a ++ causes a compile error, shows modules blocking reflective access unless modules opens is used, compares concatenation vs text blocks and formatted precedence, and builds records and pattern matching examples that fail or succeed as shown, plus a free five-challenge book.
AI-written summary · about
chapters (13)
- 0:00Introduction to Java challenges
- 1:18JDK 6 stack and queue interface
- 5:45JDK 7 try with resources
- 9:11JDK 8 streams and lambdas
- 13:10JDK 8 lambda expressions
- 15:53JDK 9 Java modules
- 20:42JDK 10 and 11 type inference
- 26:09JDK 14 switch expressions
- 31:17JDK 15 text blocks
- 35:46JDK 16 records
- 40:00JDK 16 instance of pattern matching
- 44:06JDK 17 sealed classes
- 46:35About the speaker and resources








