和关键字void应该没有什么关系吧

解决方案 »

  1.   

    java.lang.Class类有方法
    Class.getMethod(String name, Class[] params),返回java.lang.reflect.Method类。Method.getReturnType() 函数得到一个关于返回值的类型。如Method.getReturnType().getClassName.eqauls( Void.Type.getClassName() ),  表示是该方法返回void同理Method.getReturnType().getClassName.eqauls( Integer.Type.getClassName()) ,表示是该方法返回 int同理Method.getReturnType().getClassName.eqauls( Integer.getClass().getClassName()) ,表示是该方法返回 java.lang.Integer类型
      

  2.   

    用在Reflection中,如littlecpu所述.
      

  3.   

    The Void class is an uninstantiable placeholder class to hold a reference to the Class object representing the Java keyword void.
      

  4.   

    java.lang.Class可用于"Reflection"(自摸:-))中.