如题,谢谢。

解决方案 »

  1.   

    哎 百度搜搜啊 多的是啊......
    笼统的说就是如果你想做某些操作 而且操作完后不需要返回任何值 那你就把方法定义成Void的
      

  2.   

    nothing more to say, 没有类型的时候用,在Java里,恐怕只有方法的返回值的地方可以用到了。
      

  3.   

    不会是想问java中方法的void修饰符吧...
      

  4.   

    java方法必须指定返回类型,如果你没有返回值,可以将其返回类型指定为void
      

  5.   


    //method that return String
    public String method()
    {
        //must return value of String type
        return new String( "..." );
    }//method that return int
    public int method()
    {
        //must return value of int type
        return digital;
    }//if here does not need to return any value
    //then you can choose "void", means do not 
    //need to "return"
    public void method()
    {
        //no word "return"
    }
      

  6.   

    void 不返回值 好像基础书上都有说吧