当前位置: 代码迷 >> Eclipse >> 这段代码fun()显示没定义 该如何定义呀?
  详细解决方案

这段代码fun()显示没定义 该如何定义呀?

热度:84   发布时间:2016-04-23 01:09:27.0
这段代码fun()显示没定义 该怎么定义呀???

public class try3{
public void test(){
try{
 fun();
System.out.print("情况1");
}
catch(ArrayIndexOutOfBoundsException e)
{
System.out.print("情况2");
}
catch(Exception e)
{
System.out.print("情况3");
}
finally
{
System.out.print("finally");
}
}

}

Eclipse

------解决方案--------------------
写个简单的方法
public void fun(){
System.out.println("hello");
}
应该就ok
  相关解决方案