There is no specific limit to the specification.
There is probably an implementation-specific limitation, if only that you are limited by available memory (class information must be stored somewhere).
And if you ever reach this limit, your design is still broken (anything that comes in double digits is definitely a code smell).
Joachim sauer
source share