public class AnonymousSealed { sealed interface Payment permits Card {} record Card(long amount) implements Payment {} static Payment sneaky() { return new Payment() {}; // an anonymous class is a subtype nobody listed } }