Imagine I want to write a useless method: isInstanceofthat returns boolean.
I thought about it. But I do not go out. instanceofshould be used as:
[object] instanceof [a classname]
public static boolean isInstanceof(Object obj, )
{
return obj instanceof
}
But how can I make a parameter for [a classname]? Is there a way to do this without a method isInstance(Class cls)from java.lang.Class?
thank
source
share