Ivan Polovyi
Jun 16, 2024

--

My tutorial is based on official Oracle documentation. However, I couldn't find any mention of 'sum types' or 'enums on steroids.' Could you please provide a reference for these concepts?

A video on a Java official YouTube channel about sealed classes made by Dr. Venkat Subramaniam states the first benefit of Sealed classes as Data Modeling. I am not arguing with you that this is not the benefit, but it is definitely not the main one, and it is not my personal opinion.

Moreover, I have an article about switch expression; this one is about sealed classes, and I plan to create one about pattern matching, where I will show this benefit. My tutorials is for beguiners and I try to focus one particular thing instead of covering all in one try. But anyway, thanks for reading.

--

--

Ivan Polovyi
Ivan Polovyi

Written by Ivan Polovyi

I am a Java Developer | OCA Java EE 8 | Spring Professional | AWS CDA | CKA | DCA | Oracle DB CA. I started programming at age 34 and still learning.

Responses (1)