Pattern Matching in Java: 5 Examples for Busy Developers

Published: 02 February 2023
on channel: IntelliJ IDEA, a JetBrains IDE
13,440
384

Are you a busy developer who wants to use Pattern Matching but can not find enough time to read through all the details?
Don't worry. We've got you covered.
In this video, I'll show you five examples where you can use Pattern Matching in Java. I'll also cover why you might want to use them, where, and how.

00:00 - Intro
00:26 - Replacing long if-else constructs with switch
04:57 - Using Type patterns with instanceof
08:58 - Checking exhaustive enum values or sealed class subtypes
12:50 - Deconstructing nested records
13:51 - Separation of computation and its side effect

For more information, take a look at:
• Java 19 and IntelliJ IDEA: https://jb.gg/cj146w
• Java 17 and IntelliJ IDEA: https://jb.gg/xdm1k1

*Author: Mala Gupta

Download IntelliJ IDEA: https://jb.gg/download-intellij-idea

Join us:

Website https://jb.gg/website
Blog https://jb.gg/blog
Twitter   / intellijidea  
Facebook   / intellijidea  

#intelliJIDEA #intelliJ #jetbrains #java #programming


Watch video Pattern Matching in Java: 5 Examples for Busy Developers online without registration, duration hours minute second in high quality. This video was added by user IntelliJ IDEA, a JetBrains IDE 02 February 2023, don't forget to share it with your friends and acquaintances, it has been viewed on our site 13,440 once and liked it 384 people.