Understanding Sealed Classes in Java: When and How to Use sealed, final, and non-sealed

✅ What is a sealed class?