I have tried:

```
package ro.ex;    

import java.io.IOException;
import java.lang.reflect.Type;

class Ex {
    public boolean isIns(Object o, Class t) {
        o instanceof t;
    }
    public static void main(String[] args) throws IOException {}
}

```

above code will raise unknown class "t"

**My question is:** How to pass above code.

**update:**

following code can't pass intellij idea syntax checker

```
public boolean isIns(Object o, Class<?> t) {
    return o instanceof t;
}

```

so the right code in idea is:

```
public boolean isIns(Object o, Class<?> t) {
    return t.isAssignableFrom(o.getClass());
}

```

the more simple way is:

```
package ro.ex;

import java.io.IOException;
import java.lang.reflect.Type;

class Ex {
    public boolean isIns(Object o, Class t) {
        return t.isInstance(o);
    }

    public static void main(String[] args) throws IOException {
        Object r = new Ex().isIns("", String.class);
        System.out.println(r + "\t\t" + new Exception().getStackTrace()[0].getFileName() + ":" + new Exception().getStackTrace()[0].getLineNumber());
    }
}

```