The 'permits' keyword specifies allowed subclasses.
In a sealed class, the 'permits' keyword is used to explicitly declare which classes can extend the sealed class. This ensures that only the specified classes are part of the inheritance hierarchy. For instance, if a sealed class `Order` permits `OnlineOrder` and `InStoreOrder`, only these two classes can extend `Order`, ensuring control over the order processing logic.