Number.class
public class DynamicTypeChecking { public static void main(final String[] args) { new Integer("0").getClass().isInstance(new Double("1.2").getClass()); Number.class.isInstance(123); Number.class.isAssignableFrom(new Double("1.2").getClass()); } }