Class: isInstance(Object obj)
import org.xml.sax.XMLReader;
public class Main {
public static void main(String[] args) {
System.out.println(Size.class.isEnum());
System.out.println(String.class.isEnum());
System.out.println(String.class.isInstance("Test"));
System.out.println(XMLReader.class.isInterface());
}
}
enum Size {
S, M, L, XL, XXL, XXXL;
}
Related examples in the same category