// interfaces/NonSealed.java // (c)2021 MindView LLC: see Copyright.txt // We make no guarantees that this code is fit for any purpose. // Visit http://OnJava8.com for more book information. // {NewFeature} Since JDK 17 sealed class Super permits Sub1, Sub2 {} final class Sub1 extends Super {} non-sealed class Sub2 extends Super {} class Any1 extends Sub2 {} class Any2 extends Sub2 {}