ArcGIS Web 地图制作指南
2015-10-16 13:07
260 查看
如下面的代码,结果就不解释了。
输出为:
public class TryTest { public static void main(String[] args) { TryTest tt = new TryTest(); tt.test1(); System.out.println(); tt.test2(); System.out.println(); tt.test3(); } public void test1() { int a = 2; System.out.println("start"); try { a = a/0; }catch(Exception e) { System.out.println("catch"); }finally { System.out.println("finally"); } System.out.println("end"); } public void test2() { int a = 2; System.out.println("start"); try { a = a/0; }catch(Exception e) { System.out.println("catch"); return; }finally { System.out.println("finally"); } System.out.println("end"); } public void test3() { int a = 2; System.out.println("start"); try { a = a/0; }catch(Exception e) { System.out.println("catch"); System.exit(0); }finally { System.out.println("finally"); } System.out.println("end"); } public void test() { //只有final可以使用 final int a = 1; // static int b = 2; // final static int c = 3; // private int d = 4; } }
输出为:
start catch finally end start catch finally start catch
相关文章推荐
- NoSQL数据库Redis系统性介绍
- PyQt4 QListWidget 使用教程
- Using smem on Android
- Android memory usage
- UNIX网络编程:select,epoll,poll比较
- 删除打印机(win7)
- Greedy:Stall Reservations(POJ 3190)
- LoadRunner性能测试专项班隆重开班
- 初学markdown语法
- SDL_image之hello
- MegaCli 监控raid状态
- 关于Android的.so文件你所需要知道的
- ngxin 启用 gzip
- MyEclipse 10破解教程
- Android之UI线程与子线程交互设计的5种方法
- Hdfs体系结果及shell java操作方式 笔记五
- Hdfs体系结果及shell java操作方式 笔记五
- 语音编码常见概念解释--摘选自speex codec文档
- Spring JdbcTemplate用法整理
- 大型网站系统架构的演化