日期:2014-05-20 浏览次数:20691 次
//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" }
------解决方案--------------------
不需要返回值的方法的情况
------解决方案--------------------
void 不返回值 好像基础书上都有说吧