0
以下是我的代码编译好,但我得到ClassNotFoundException
的情况下2运行的同时,我的问题是为什么我收到错误的情况下2:isInstance()ClassNotFoundException的
案例1
命令java Var Var
输出false
案例2
命令java Var Object
输出ClassNotFoundException : Object
class Var
{
public static void main(String[] args) throws Exception
{
Thread t = new Thread();
System.out.println(Class.forName(args[0]).isInstance(t));
}
}