The interfaces for a primitive type is an empty array : Interface « Reflection « Java






The 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(); // []

  }
}

   
    
    
  








Related examples in the same category

1.Class Reflection: is it an interfaceClass Reflection: is it an interface
2.Class Reflection: implemented interfaces
3.Determining If a Class Object Represents a Class or Interface
4.The superclass of interfaces is always null
5.Listing the Interfaces That a Class Implements
6.Get Super Interfaces
7.Listing the Interfaces That an Interface Extends
8.Returns true if type is implementing Map
9.Search over classpath retrieving classes that implement a certain interface
10.Returns true if a class implements Serializable and false otherwise.