I have just read that Java 15 should have sealed classes.
jep360 says:
Sealed classes and interfaces restrict which other classes or interfaces may extend or implement them.
I thought that this is exactly what a final class does in Java.
So now I wonder: What is the difference between a final class and a sealed class?