SlideShare une entreprise Scribd logo
1  sur  88
千呼萬喚始出來的 Java SE   7 ,[object Object],[object Object],[object Object]
議程 ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Java  進化史 ? 2011/07/28 2002/02/13  2004/09/29  2006/12/11
A / B  計畫 ,[object Object],[object Object]
JDK7  ... λ Language support for collections  Annotations on Java types  Jigsaw
JDK7  有 ... ,[object Object],[object Object],NIO.2 Coin Invoke Dynamic Concurrency Updates
JSR334 / Coin   專案
Small language enhancements ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Strings in if-else
Strings in switch
反組譯 ... 先用   hashCode() 再用   equals()
Binary integral literals and underscores in numeric literals ,[object Object],[object Object]
Multi-catch 都作一樣的事 略 ... 略 ...
Multi-catch ,[object Object]
Multi-catch ,[object Object],try { /* throws some ReflectiveOperationException */ } catch ( final  ClassNotFoundException ex1) { /* body */ }  catch ( final  IllegalAccessException ex2) { /* body */ }
More precise rethrow ,[object Object],... ... //  作一些事 沒有宣告  Exception
More precise rethrow ,[object Object],... ...
Inferring Types with <> ,[object Object],[object Object],[object Object]
Inferring Types with <> ,[object Object],[object Object]
Inferring Types with <> ,[object Object],[object Object]
Inferring Types with <> ,[object Object]
Try-with-resources ,[object Object]
Try-with-resources ,[object Object]
Try-with-resources try  ResourceSpecification    Block ⇒ {   final  VariableModifiers_minus_final   R  #resource =  Expression ;   Throwable #primaryException = null;   try  ResourceSpecificationtail      Block   catch (Throwable #t) {     #primaryException = t;     throw #t;   } finally {     if (#resource != null) {       if (#primaryException != null) {         try {           #resource.close();         } catch(Throwable #suppressedException) {           #primaryException.addSuppressed(#suppressedException);         }       } else {         #resource.close();       }     }   } }
Try-with-resources ,[object Object],try-with-resources
Try-with-resources ,[object Object],[object Object],[object Object]
Try-with-resources ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Try-with-resources ,[object Object]
Heap pollution ,[object Object],[object Object],要求編譯器檢查傳入引數是不是都是  T  型態
Heap pollution ,[object Object],[object Object],.....: warning: [unchecked] unchecked generic array creation of type java .util.List<java.lang.String>[] for varargs parameter Util.doSome(Arrays.asList(&quot;three&quot;, &quot;four&quot;), Arrays.asList(“five&quot;, “six&quot;)); ^ 1 warning
Heap pollution ,[object Object],[object Object],[object Object],[object Object],[object Object]
Simplified Varargs Method Invocation ,[object Object],....: warning: [unchecked] Possible  heap pollution  from parameterized var arg type T public static <T> List<T> doSome(T... t) { ^ where T is a type-variable: T extends Object declared in method <T>doSome(T...) 1 warning 提醒設計  doSome()   保證不會發生  Heap Pollution
Simplified Varargs Method Invocation ,[object Object],[object Object],[object Object],[object Object],[object Object]
Simplified Varargs Method Invocation ,[object Object]
Unicode 6.0.0 ,[object Object],繪文字 ( emoji )
Unicode 6.0.0 ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
JDBC 4.1 ,[object Object],[object Object],[object Object],[object Object]
JDBC 4.1 ,[object Object],[object Object],java -D javax.sql.rowset.RowSetFactory =com.sun.rowset.RowSetFactoryImpl
JSR203 / NIO.2
NIO ,[object Object],[object Object],[object Object],[object Object],[object Object],NIO2 ,[object Object],[object Object],[object Object],[object Object]
File System API ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
File System API ,[object Object],[object Object],[object Object],[object Object],[object Object]
關於  Path ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
關於  Path ,[object Object],[object Object]
關於  Path ,[object Object],[object Object],[object Object],同一階層 path.equals(otherPath)  Path path = ...;  for (Path name: path) {  System.out.println(name);  }
檔案移動與複製 ,[object Object],[object Object],[object Object]
檔案屬性( Metadata ) ,[object Object]
檔案屬性( Metadata ) ,[object Object],[object Object]
檔案屬性( Metadata ) ,[object Object],[object Object],[object Object]
檔案讀寫 ,[object Object]
檔案讀寫 ,[object Object]
目錄讀取 ,[object Object],[object Object],[object Object]
FileVisitor
FileVisitor 啟始目錄 目錄 檔案 鏈結 檔案 檔案 visitFile visitFile visitFile visitFile preVisitDirectory preVisitDirectory postVisitDirectory postVisitDirectory
監看目錄修改 ,[object Object]
新舊之間 ,[object Object],[object Object]
Asynchronous Channel API ,[object Object],[object Object],[object Object],[object Object],[object Object]
Asynchronous Channel API ,[object Object],[object Object],[object Object]
Asynchronous Channel API ,[object Object]
Asynchronous Channel API ,[object Object],[object Object],Future<Void>
Asynchronous Channel API ,[object Object],[object Object]
Asynchronous Channel API ,[object Object],[object Object]
JSR166y / Concurrency Updates
Concurrency Updates ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Divide and conquer
Fork / Join  模式 ,[object Object],[object Object]
Fork / Join  框架 不需傳回值的子動作 透過泛型傳回值的子任務
Fork / Join  框架 ,[object Object],[object Object],[object Object],[object Object]
Fibonacci 結果  1134903170 耗時  24608
Fibonacci .... you'd pick some minimum granularity size for which you always sequentially solve rather than subdividing.  結果  1134903170 耗時  199604
搜尋檔案 結果  665 耗時  12813
搜尋檔案 結果  665 耗時  7596
JSR292 / Da Vinci Machine  專案
靜態定型語言 ,[object Object],[object Object]
靜態定型語言 2: invokestatic  #3  // Method doSome:(Ljava/lang/String;)Ljava/lang/Integer; 17: invokevirtual #7  // Method Other.doOther:(Ljava/lang/String;)Ljava/lang/Integer; 32: invokeinterface #9,  2  // InterfaceMethod Another.doAnother:(Ljava/lang/String;)Ljava/lang/Integer;
動態定型語言 ,[object Object],[object Object],function max(m, n) { if(n.lessThan(m)) { return m; } return n; } def max(m, n):   return m if n.lessThan(m) else n JavaScript Python
動態定型語言的挑戰 ,[object Object],[object Object],[object Object],[object Object],function max(m, n) { if( n.lessThan(m )) { return m; } return n; }
動態定型語言的挑戰 ,[object Object],[object Object],[object Object],[object Object],MyObject  max( MyObject  x,  MyObject  y) { if( n.lessThan(m) ) { return n; } return m; }   invokevirtual #9  // Method MyObject.lessThan:(Ljava/lang/MyObject;)Ljava/lang/Boolean;
動態定型語言的挑戰 ,[object Object],[object Object],[object Object],[object Object]
動態定型語言的挑戰 ,[object Object],[object Object]
JSR 292  ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],invokedynamic <method-specification> <n>
[object Object],[object Object],a = 40; b = a  +  2;  bipush  40 istore_1 iload_1 invokestatic  Method java/lang/Integer.valueOf:&quot;(I)Ljava/lang/Integer;&quot;; bipush  2 invokestatic  Method java/lang/Integer.valueOf:&quot;(I)Ljava/lang/Integer;&quot;; invokedynamic  InvokeDynamic REF_invokeStatic: Example.mybsm: &quot;(Ljava/lang/invoke/MethodHandles/Lookup; Ljava/lang/String; Ljava/lang/invoke/MethodType;) Ljava/lang/invoke/CallSite;&quot;: +: &quot;(Ljava/lang/Integer; Ljava/lang/Integer;) Ljava/lang/Integer;&quot;; the invokedynamic  call site  is +  method implementation currently unknown bootstrap method
JSR 292 ,[object Object]
[object Object],類似  Reflection ?
JSR 292 ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
JSR 292 ,[object Object],[object Object]
JSR 292 ,[object Object],[object Object]
Recently rediscovered diagrams prove Leonardo invented the first JVM ? .  http://openjdk.java.net/projects/mlvm/   感謝 ,[object Object],[object Object],[object Object],Orz...

Contenu connexe

Tendances

Spring 2.0 技術手冊第六章 - Hibernate 與 Spring
Spring 2.0 技術手冊第六章 - Hibernate 與 SpringSpring 2.0 技術手冊第六章 - Hibernate 與 Spring
Spring 2.0 技術手冊第六章 - Hibernate 與 SpringJustin Lin
 
Ecma script edition5-小试
Ecma script edition5-小试Ecma script edition5-小试
Ecma script edition5-小试lydiafly
 
Ecmascript
EcmascriptEcmascript
Ecmascriptjay li
 
Spring4.x + hibernate4.x_配置详解
Spring4.x + hibernate4.x_配置详解Spring4.x + hibernate4.x_配置详解
Spring4.x + hibernate4.x_配置详解zany_hui
 
J2ee经典学习笔记
J2ee经典学习笔记J2ee经典学习笔记
J2ee经典学习笔记yiditushe
 
Spring 2.0 技術手冊第十章 - 專案:線上書籤
Spring 2.0 技術手冊第十章 - 專案:線上書籤Spring 2.0 技術手冊第十章 - 專案:線上書籤
Spring 2.0 技術手冊第十章 - 專案:線上書籤Justin Lin
 
Java Collections中的Fail Fast机制
Java Collections中的Fail Fast机制Java Collections中的Fail Fast机制
Java Collections中的Fail Fast机制yiditushe
 
Jsp面试知识
Jsp面试知识Jsp面试知识
Jsp面试知识yiditushe
 
Java多线程编程详解
Java多线程编程详解Java多线程编程详解
Java多线程编程详解yiditushe
 
中心教员J2 Ee面试题
中心教员J2 Ee面试题中心教员J2 Ee面试题
中心教员J2 Ee面试题yiditushe
 
Spring 2.0 技術手冊第四章 - Spring AOP
Spring 2.0 技術手冊第四章 - Spring AOPSpring 2.0 技術手冊第四章 - Spring AOP
Spring 2.0 技術手冊第四章 - Spring AOPJustin Lin
 
Java面试知识
Java面试知识Java面试知识
Java面试知识yiditushe
 
Javascript share
Javascript shareJavascript share
Javascript shareXu Mac
 
Spring 2.0 技術手冊第七章 - Spring Web MVC 框架
Spring 2.0 技術手冊第七章 - Spring Web MVC 框架Spring 2.0 技術手冊第七章 - Spring Web MVC 框架
Spring 2.0 技術手冊第七章 - Spring Web MVC 框架Justin Lin
 
Spring 2.0 技術手冊第二章 - Spring 入門
Spring 2.0 技術手冊第二章 - Spring 入門Spring 2.0 技術手冊第二章 - Spring 入門
Spring 2.0 技術手冊第二章 - Spring 入門Justin Lin
 
2, object oriented programming
2, object oriented programming2, object oriented programming
2, object oriented programmingted-xu
 
Reactive X 响应式编程
Reactive X 响应式编程Reactive X 响应式编程
Reactive X 响应式编程Jun Liu
 

Tendances (20)

Java annotation
Java annotationJava annotation
Java annotation
 
Spring 2.0 技術手冊第六章 - Hibernate 與 Spring
Spring 2.0 技術手冊第六章 - Hibernate 與 SpringSpring 2.0 技術手冊第六章 - Hibernate 與 Spring
Spring 2.0 技術手冊第六章 - Hibernate 與 Spring
 
Ecma script edition5-小试
Ecma script edition5-小试Ecma script edition5-小试
Ecma script edition5-小试
 
Ecmascript
EcmascriptEcmascript
Ecmascript
 
A
AA
A
 
Spring4.x + hibernate4.x_配置详解
Spring4.x + hibernate4.x_配置详解Spring4.x + hibernate4.x_配置详解
Spring4.x + hibernate4.x_配置详解
 
J2ee经典学习笔记
J2ee经典学习笔记J2ee经典学习笔记
J2ee经典学习笔记
 
Spring 2.0 技術手冊第十章 - 專案:線上書籤
Spring 2.0 技術手冊第十章 - 專案:線上書籤Spring 2.0 技術手冊第十章 - 專案:線上書籤
Spring 2.0 技術手冊第十章 - 專案:線上書籤
 
Java Collections中的Fail Fast机制
Java Collections中的Fail Fast机制Java Collections中的Fail Fast机制
Java Collections中的Fail Fast机制
 
Jsp面试知识
Jsp面试知识Jsp面试知识
Jsp面试知识
 
Java多线程编程详解
Java多线程编程详解Java多线程编程详解
Java多线程编程详解
 
中心教员J2 Ee面试题
中心教员J2 Ee面试题中心教员J2 Ee面试题
中心教员J2 Ee面试题
 
Spring 2.0 技術手冊第四章 - Spring AOP
Spring 2.0 技術手冊第四章 - Spring AOPSpring 2.0 技術手冊第四章 - Spring AOP
Spring 2.0 技術手冊第四章 - Spring AOP
 
Java面试知识
Java面试知识Java面试知识
Java面试知识
 
Javascript share
Javascript shareJavascript share
Javascript share
 
Spring 2.0 技術手冊第七章 - Spring Web MVC 框架
Spring 2.0 技術手冊第七章 - Spring Web MVC 框架Spring 2.0 技術手冊第七章 - Spring Web MVC 框架
Spring 2.0 技術手冊第七章 - Spring Web MVC 框架
 
Spring 2.0 技術手冊第二章 - Spring 入門
Spring 2.0 技術手冊第二章 - Spring 入門Spring 2.0 技術手冊第二章 - Spring 入門
Spring 2.0 技術手冊第二章 - Spring 入門
 
2, object oriented programming
2, object oriented programming2, object oriented programming
2, object oriented programming
 
Reactive X 响应式编程
Reactive X 响应式编程Reactive X 响应式编程
Reactive X 响应式编程
 
beidakejian
beidakejianbeidakejian
beidakejian
 

En vedette

jQuery SUG Group Introduction
jQuery SUG Group IntroductionjQuery SUG Group Introduction
jQuery SUG Group IntroductionAndrew Chalkley
 
Pimp your site with jQuery!
Pimp your site with jQuery!Pimp your site with jQuery!
Pimp your site with jQuery!Elliott Kember
 
使用Hudson打造屬於你自己的軟體建構機器人
使用Hudson打造屬於你自己的軟體建構機器人使用Hudson打造屬於你自己的軟體建構機器人
使用Hudson打造屬於你自己的軟體建構機器人javatwo2011
 
比XML更好用的Java Annotation
比XML更好用的Java Annotation比XML更好用的Java Annotation
比XML更好用的Java Annotationjavatwo2011
 
Twiggy - let's get our widget on!
Twiggy - let's get our widget on!Twiggy - let's get our widget on!
Twiggy - let's get our widget on!Elliott Kember
 
What's Next in Growth? 2016
What's Next in Growth? 2016What's Next in Growth? 2016
What's Next in Growth? 2016Andrew Chen
 
32 Ways a Digital Marketing Consultant Can Help Grow Your Business
32 Ways a Digital Marketing Consultant Can Help Grow Your Business32 Ways a Digital Marketing Consultant Can Help Grow Your Business
32 Ways a Digital Marketing Consultant Can Help Grow Your BusinessBarry Feldman
 

En vedette (7)

jQuery SUG Group Introduction
jQuery SUG Group IntroductionjQuery SUG Group Introduction
jQuery SUG Group Introduction
 
Pimp your site with jQuery!
Pimp your site with jQuery!Pimp your site with jQuery!
Pimp your site with jQuery!
 
使用Hudson打造屬於你自己的軟體建構機器人
使用Hudson打造屬於你自己的軟體建構機器人使用Hudson打造屬於你自己的軟體建構機器人
使用Hudson打造屬於你自己的軟體建構機器人
 
比XML更好用的Java Annotation
比XML更好用的Java Annotation比XML更好用的Java Annotation
比XML更好用的Java Annotation
 
Twiggy - let's get our widget on!
Twiggy - let's get our widget on!Twiggy - let's get our widget on!
Twiggy - let's get our widget on!
 
What's Next in Growth? 2016
What's Next in Growth? 2016What's Next in Growth? 2016
What's Next in Growth? 2016
 
32 Ways a Digital Marketing Consultant Can Help Grow Your Business
32 Ways a Digital Marketing Consultant Can Help Grow Your Business32 Ways a Digital Marketing Consultant Can Help Grow Your Business
32 Ways a Digital Marketing Consultant Can Help Grow Your Business
 

Similaire à 千呼萬喚始出來的Java SE 7

千呼萬喚始出來的 Java SE 7
千呼萬喚始出來的 Java SE 7千呼萬喚始出來的 Java SE 7
千呼萬喚始出來的 Java SE 7Justin Lin
 
IKVM.NET 深入敵營的 Java
IKVM.NET 深入敵營的 JavaIKVM.NET 深入敵營的 Java
IKVM.NET 深入敵營的 Java建興 王
 
Java Script 引擎技术
Java Script 引擎技术Java Script 引擎技术
Java Script 引擎技术bigqiang zou
 
从无阻塞并行脚本加载(Lab.js)到浏览器消息模型
从无阻塞并行脚本加载(Lab.js)到浏览器消息模型从无阻塞并行脚本加载(Lab.js)到浏览器消息模型
从无阻塞并行脚本加载(Lab.js)到浏览器消息模型Jackson Tian
 
Java 1(Java概述)
Java 1(Java概述)Java 1(Java概述)
Java 1(Java概述)xzdbd
 
Lucene 全文检索实践
Lucene 全文检索实践Lucene 全文检索实践
Lucene 全文检索实践yiditushe
 
Java Jdk6学习笔记[Ppt]
Java Jdk6学习笔记[Ppt]Java Jdk6学习笔记[Ppt]
Java Jdk6学习笔记[Ppt]yiditushe
 
ES5 introduction
ES5 introductionES5 introduction
ES5 introductionotakustay
 
Java华为面试题
Java华为面试题Java华为面试题
Java华为面试题yiditushe
 
程式人雜誌 -- 2015 年5月號
程式人雜誌 -- 2015 年5月號程式人雜誌 -- 2015 年5月號
程式人雜誌 -- 2015 年5月號鍾誠 陳鍾誠
 
程式人雜誌 2015年五月
程式人雜誌 2015年五月程式人雜誌 2015年五月
程式人雜誌 2015年五月鍾誠 陳鍾誠
 
用JAX-RS和Jersey完成RESTful Web Services
用JAX-RS和Jersey完成RESTful Web Services用JAX-RS和Jersey完成RESTful Web Services
用JAX-RS和Jersey完成RESTful Web Servicesjavatwo2011
 
Efficient JavaScript Unit Testing (Chinese Version), JavaOne China 2013
Efficient JavaScript Unit Testing (Chinese Version), JavaOne China 2013Efficient JavaScript Unit Testing (Chinese Version), JavaOne China 2013
Efficient JavaScript Unit Testing (Chinese Version), JavaOne China 2013Hazem Saleh
 
Terracotta And Continuent Based Clustering Architecture
Terracotta And Continuent Based Clustering ArchitectureTerracotta And Continuent Based Clustering Architecture
Terracotta And Continuent Based Clustering ArchitectureTarget Source
 
JavaScript 物件導向觀念入門 v.s. TypeScript 開發實戰 (微軟實戰課程日)
JavaScript 物件導向觀念入門 v.s. TypeScript 開發實戰 (微軟實戰課程日)JavaScript 物件導向觀念入門 v.s. TypeScript 開發實戰 (微軟實戰課程日)
JavaScript 物件導向觀念入門 v.s. TypeScript 開發實戰 (微軟實戰課程日)Will Huang
 
學好 node.js 不可不知的事
學好 node.js 不可不知的事學好 node.js 不可不知的事
學好 node.js 不可不知的事Ben Lue
 
The Evolution of Async Programming (GZ TechParty C#)
The Evolution of Async Programming (GZ TechParty C#)The Evolution of Async Programming (GZ TechParty C#)
The Evolution of Async Programming (GZ TechParty C#)jeffz
 

Similaire à 千呼萬喚始出來的Java SE 7 (20)

千呼萬喚始出來的 Java SE 7
千呼萬喚始出來的 Java SE 7千呼萬喚始出來的 Java SE 7
千呼萬喚始出來的 Java SE 7
 
IKVM.NET 深入敵營的 Java
IKVM.NET 深入敵營的 JavaIKVM.NET 深入敵營的 Java
IKVM.NET 深入敵營的 Java
 
Java Script 引擎技术
Java Script 引擎技术Java Script 引擎技术
Java Script 引擎技术
 
从无阻塞并行脚本加载(Lab.js)到浏览器消息模型
从无阻塞并行脚本加载(Lab.js)到浏览器消息模型从无阻塞并行脚本加载(Lab.js)到浏览器消息模型
从无阻塞并行脚本加载(Lab.js)到浏览器消息模型
 
Java 1(Java概述)
Java 1(Java概述)Java 1(Java概述)
Java 1(Java概述)
 
Lucene 全文检索实践
Lucene 全文检索实践Lucene 全文检索实践
Lucene 全文检索实践
 
Java Jdk6学习笔记[Ppt]
Java Jdk6学习笔记[Ppt]Java Jdk6学习笔记[Ppt]
Java Jdk6学习笔记[Ppt]
 
ES5 introduction
ES5 introductionES5 introduction
ES5 introduction
 
Java华为面试题
Java华为面试题Java华为面试题
Java华为面试题
 
程式人雜誌 -- 2015 年5月號
程式人雜誌 -- 2015 年5月號程式人雜誌 -- 2015 年5月號
程式人雜誌 -- 2015 年5月號
 
程式人雜誌 2015年五月
程式人雜誌 2015年五月程式人雜誌 2015年五月
程式人雜誌 2015年五月
 
用JAX-RS和Jersey完成RESTful Web Services
用JAX-RS和Jersey完成RESTful Web Services用JAX-RS和Jersey完成RESTful Web Services
用JAX-RS和Jersey完成RESTful Web Services
 
Efficient JavaScript Unit Testing (Chinese Version), JavaOne China 2013
Efficient JavaScript Unit Testing (Chinese Version), JavaOne China 2013Efficient JavaScript Unit Testing (Chinese Version), JavaOne China 2013
Efficient JavaScript Unit Testing (Chinese Version), JavaOne China 2013
 
Exodus2 大局观
Exodus2 大局观Exodus2 大局观
Exodus2 大局观
 
Scala
ScalaScala
Scala
 
Terracotta And Continuent Based Clustering Architecture
Terracotta And Continuent Based Clustering ArchitectureTerracotta And Continuent Based Clustering Architecture
Terracotta And Continuent Based Clustering Architecture
 
jasmine入门指南
jasmine入门指南jasmine入门指南
jasmine入门指南
 
JavaScript 物件導向觀念入門 v.s. TypeScript 開發實戰 (微軟實戰課程日)
JavaScript 物件導向觀念入門 v.s. TypeScript 開發實戰 (微軟實戰課程日)JavaScript 物件導向觀念入門 v.s. TypeScript 開發實戰 (微軟實戰課程日)
JavaScript 物件導向觀念入門 v.s. TypeScript 開發實戰 (微軟實戰課程日)
 
學好 node.js 不可不知的事
學好 node.js 不可不知的事學好 node.js 不可不知的事
學好 node.js 不可不知的事
 
The Evolution of Async Programming (GZ TechParty C#)
The Evolution of Async Programming (GZ TechParty C#)The Evolution of Async Programming (GZ TechParty C#)
The Evolution of Async Programming (GZ TechParty C#)
 

千呼萬喚始出來的Java SE 7

  • 1.
  • 2.
  • 3. Java 進化史 ? 2011/07/28 2002/02/13 2004/09/29 2006/12/11
  • 4.
  • 5. JDK7 ... λ Language support for collections Annotations on Java types Jigsaw
  • 6.
  • 7. JSR334 / Coin 專案
  • 8.
  • 11. 反組譯 ... 先用 hashCode() 再用 equals()
  • 12.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24. Try-with-resources try ResourceSpecification    Block ⇒ {   final VariableModifiers_minus_final R #resource = Expression ;   Throwable #primaryException = null;   try ResourceSpecificationtail      Block   catch (Throwable #t) {     #primaryException = t;     throw #t;   } finally {     if (#resource != null) {       if (#primaryException != null) {         try {           #resource.close();         } catch(Throwable #suppressedException) {           #primaryException.addSuppressed(#suppressedException);         }       } else {         #resource.close();       }     }   } }
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.
  • 37.
  • 38.
  • 40.
  • 41.
  • 42.
  • 43.
  • 44.
  • 45.
  • 46.
  • 47.
  • 48.
  • 49.
  • 50.
  • 51.
  • 52.
  • 54. FileVisitor 啟始目錄 目錄 檔案 鏈結 檔案 檔案 visitFile visitFile visitFile visitFile preVisitDirectory preVisitDirectory postVisitDirectory postVisitDirectory
  • 55.
  • 56.
  • 57.
  • 58.
  • 59.
  • 60.
  • 61.
  • 62.
  • 64.
  • 66.
  • 67. Fork / Join 框架 不需傳回值的子動作 透過泛型傳回值的子任務
  • 68.
  • 69. Fibonacci 結果 1134903170 耗時 24608
  • 70. Fibonacci .... you'd pick some minimum granularity size for which you always sequentially solve rather than subdividing. 結果 1134903170 耗時 199604
  • 71. 搜尋檔案 結果 665 耗時 12813
  • 72. 搜尋檔案 結果 665 耗時 7596
  • 73. JSR292 / Da Vinci Machine 專案
  • 74.
  • 75. 靜態定型語言 2: invokestatic #3 // Method doSome:(Ljava/lang/String;)Ljava/lang/Integer; 17: invokevirtual #7 // Method Other.doOther:(Ljava/lang/String;)Ljava/lang/Integer; 32: invokeinterface #9, 2 // InterfaceMethod Another.doAnother:(Ljava/lang/String;)Ljava/lang/Integer;
  • 76.
  • 77.
  • 78.
  • 79.
  • 80.
  • 81.
  • 82.
  • 83.
  • 84.
  • 85.
  • 86.
  • 87.
  • 88.