是如此么?
而编译时异常,如果你捕获了并进行了处理,那么程序能够继续执行下去??

解决方案 »

  1.   

    public static void main(String[] args){
    try {
    int i = 9/0;
    }catch(ArithmeticException e) {
    e.printStackTrace();
    }
    System.out.println("还在执行...");
      

  2.   

    如果在catch之前,还有其他的语句呢。//.....
    try{
    if(flag)
    throw RuntimeException("run wrong");System.out.println("after throw");   //run???
    }
    catch(RuntimeException e)
    {
       System.out.println(e.getMessage());
    }
      

  3.   

    catch之前的语句不会执行,捕获异常后 finally语句块会执行
      

  4.   


    如果抛出一个运行时错误,finally也会执行么? 
    //.....
    try{
    if(flag)
    throw RuntimeException("run wrong");
     
    System.out.println("after throw");   //run???
    }
    finally
    {
    System.out.println("over");
    }
      

  5.   

    final里边的语句无论如何都会执行
      

  6.   


      finally中写的语句是一定会执行的!无论try中是否有错,它都执行一次。所以把你必须要执行的代码放到finally块中。。
      

  7.   

    try的代码块在执行到出异常的时候不会再执行该代码块的其他代码;catch的代码块在出异常的时候才会执行,例如可以加一些日志之类的输出,方便故障的排除和定位;finally的代码块无论是不是出异常了都会执行的,