Interfaces for a primitive type is an empty array
public class Main {
public static void main(String[] argv) throws Exception {
Class cls = int.class;
Class[] intfs = cls.getInterfaces(); // []
}
}
Home
Java Book
Runnable examples
Java Book
Runnable examples
Reflection interface:
- Get implemented interfaces
- Get Super Interfaces
- Is it an interface
- Does it implement Serializable interface
- Interfaces for a primitive type is an empty array
- Superclass of interfaces is always null