随笔-26  评论-111  文章-19  trackbacks-0

package test;

public class TestReturn {

 public TestReturn() {
  
 }
 
 public String returnString() throws Exception{
  throw new Exception();
 }
}

在JDK1.4中能编译通过

说明在方法执行完之前创建并抛出了异常,则该函数可以不返回值。

posted on 2005-10-12 13:06 snoics 阅读(548) 评论(0)  编辑  收藏 所属分类: 技术生涯

只有注册用户登录后才能发表评论。


网站导航: