Modifier.isInterface(int mod) has the following syntax.
public static boolean isInterface(int mod)
In the following code shows how to use Modifier.isInterface(int mod) method.
/*from w w w . j a va 2 s.c om*/ import java.lang.reflect.Modifier; public class Main { public static void main(String[] args) throws Exception { Class<?> clazz = String.class; int modifier = clazz.getModifiers(); if (Modifier.isInterface(modifier)) { System.out.println("isInterface"); } } }