Here you can find the source of instanceOf(Object o, Class clazz)
public static boolean instanceOf(Object o, Class clazz)
//package com.java2s; //License from project: Open Source License public class Main { public static boolean instanceOf(Object o, Class clazz) { return clazz.isInstance(o); }/*from ww w . ja v a2 s. c o m*/ public static boolean instanceOf(Object o, String className) { try { return instanceOf(o, getClassByName(className)); } catch (ClassNotFoundException ex) { return false; } } public static Class<?> getClassByName(String name) throws ClassNotFoundException { return Class.forName(name); } }