In this post under Java, I will explain with example the purpose of Sealed classes and interfaces. Sealed classes are the classes that doesn’t allow themselves to be inherited by any unspecified classes. Only those classes which are permitted by sealed classes, are allowed to inherit the sealed class. Lets take an example. A “Shape”…… Continue reading Sealed Classes and interfaces