I know that a Java class can have one parent class (extends
) and implement some interfaces (implements
). Is there a limit in the number of interfaces that a class can implement?
Asked
Active
Viewed 1,007 times
-2

Guido
- 46,642
- 28
- 120
- 174

Tiago Cardoso
- 1
- 2
-
1In English please – Reimeus Jun 16 '18 at 11:54
-
2Pleas use English or write your questione here [link](https://pt.stackoverflow.com) – marekmuratow Jun 16 '18 at 11:55
-
would vote to close this question – flyingfox Jun 16 '18 at 12:01
1 Answers
2
I redirect you here and the answer of @Jivings:
How much interfaces a class file can implement
From the Java VM Specification on Limitations of the JVM:
The number of direct superinterfaces of a class or interface is limited to 65535 by the size of the interfaces_count item of the ClassFile structure.
That is the only limitation. And it is due to the structure of the compiled Java bytecode.
shareeditflag
edited Jul 30 '16 at 16:55
Laurel 4,57992136
answered Jun 14 '12 at 13:28
Jivings 18.5k44283

Arnault Le Prévost-Corvellec
- 495
- 2
- 9