Pattern Matching in Java: 5 Examples for Busy Developers

Опубликовано: 02 Февраль 2023
на канале: 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


Смотрите видео Pattern Matching in Java: 5 Examples for Busy Developers онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь IntelliJ IDEA, a JetBrains IDE 02 Февраль 2023, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 13,440 раз и оно понравилось 384 людям.