How to use Java 17 new features, i.e. Records, Switch Expression and Pattern Matching for Switch (a preview feature of JDK 17) to create a Wordle Checker. This JEP Café also shows you how to write readable code even when your algorithm is complex.

Submit your katas for more live coding like this one!

⎯⎯⎯⎯⎯⎯ Chapters ⎯⎯⎯⎯⎯⎯
0:00 Intro
0:39 Wordle rules
2:05 Introducing the Wordle Checker Kata
3:04 Describing the Eclipse Collections solution
5:41 Writing a first, plain Java SE 17 solution
12:56 Using Records to improve the solution
23:27 Using Streams to remove for loops
26:53 Using Switch Expression and Pattern Matching on Sealed Types to remove `if` statements
32:10 Discussing the design or your Records
33:52 Hiding the stream in a record to clean the code
37:14 Final words and outro

⎯⎯⎯⎯⎯⎯ Resources ⎯⎯⎯⎯⎯⎯
◦ Donald Raab’s Wordle Katas ➱
◦ Vladimir’s Tweet and Solution ➱
◦ JEP 361: Switch Expressions ➱
◦ JEP 395: Records ➱
◦ JEP 409: Sealed Classes ➱
◦ JEP 420: Pattern Matching for Switch (Second Preview) ➱
◦ Eclipse Collections ➱
◦ How to use JMH ➱
◦ JDK 17 ➱
◦ Dev.java, The Destination for Java Developers ➱
◦ OpenJDK ➱
◦ Oracle Java ➱

Tags: #Java #Java17 #OpenJDK #JDK #JDK17 #Record #Programming #Kata #Wordle #JEPCafe #InsideJava