本帖最后由 _Water 于 2014-4-8 14:12 编辑
- 为何老提示错误: 无法访问的语句,System.out.println("A");
- class Demo
- {
- public static void func()
- {
- try
- {
- throw new Exception();
- System.out.println("A");
- }
- catch (Exception e)
- {
- System.out.println("B");
- }
- }
- public static void main(String[] args)
- {
- try
- {
- func();
- }
- catch (Exception e)
- {
- System.out.println("C");
- }
- System.out.println("D");
- }
- }
复制代码
|
|