Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
As Velhas Novas do Java 7
Search
Carlos Alexandro Becker
June 05, 2014
Programming
86
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
As Velhas Novas do Java 7
Carlos Alexandro Becker
June 05, 2014
More Decks by Carlos Alexandro Becker
See All by Carlos Alexandro Becker
Building GoReleaser - from shell script to paid product
caarlos0
0
4.2k
Serving TUIs over SSH with Go
caarlos0
0
2.4k
construindo uma carreira com opensource
caarlos0
0
600
Introdução ao GoReleaser
caarlos0
0
1.3k
Intro to GoReleaser
caarlos0
0
1.4k
Intro to GoReleaser
caarlos0
0
1.8k
Gerenciando Projetos OpenSource
caarlos0
0
1.7k
GoReleaser: Lessons Learned (hacktoberfest)
caarlos0
0
2.1k
GoReleaser: Lessons Learned
caarlos0
0
3.1k
Other Decks in Programming
See All in Programming
レビュー履歴をAIに食わせて、 Compose移行を加速するs
shihochan
0
270
【デモ】Kiroで体験する仕様駆動開発|設計からコーディングまでAIと進める開発フロー
cmkudo
0
580
スマート反転とウェブアクセシビリティ
camiha
0
100
Kiroで創り、AgentCoreで繋ぐ!AWSで実践する「AI-DLC」から「AIエージェント統合」までの最新地図
licux
2
340
GraphRAGのKnowledge Graphを 直接!見る/View-GraphRAG's-KnowledgeGraph-directly!
tyumugi1113
0
240
{ Android | Kotlin } Gradle Plugin in 2026
ryunen344
1
290
まだ間に合う!今年の夏こそSchemeのマクロ展開器を完全理解!
omasanori
0
630
The Good Stuff, Not the Slop: Engineering High-Quality Android Apps with Modern AI Tooling
danybony
1
190
AIに既存システムを理解させる技術 ~レガシーを見捨てないハーネスエンジニアリング入門~
ochtum
0
210
PHPプロジェクトの結合バランスを可視化する #php_night
kajitack
0
220
AI時代に学ぶ 好きなルール 嫌いなルール Linter編
shorty5121
0
860
Discordを用いたラボオートメーション関連情報収集の自動化
noguhiro2002
0
500
Featured
See All Featured
Building a Scalable Design System with Sketch
lauravandoore
463
34k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
6.1k
Unsuck your backbone
ammeep
672
58k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
710
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.8k
Automating Front-end Workflow
addyosmani
1369
210k
A Modern Web Designer's Workflow
chriscoyier
698
190k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
190
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
690
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
Odyssey Design
rkendrick25
PRO
2
800
Transcript
Java 7 as velhas novas do
Java 6: Dec 2006 Java 7: Jul 2011 Java 8:
Mar 2014 História
Lambdas, Jigsaw, e parte do Project Coin foram dropados do
Java 7
Agenda • Diamond Operator • Strings em Switch’s • Automatic
Resource Management • Numeric Literals com Underscores • Exception Handling (multi-catch) • NIO 2.0 • Fork and Join • invokedynamic
Diamond Operator // java 6 Map<String, List<String>> list6 =
new TreeMap<String, List<String>>(); // java 7 Map<String, List<String>> list7 = new TreeMap<>();
String em Switch’s // java 6 AnEnum a = AnEnum.A;
switch (a) { case A: doSomethingWhenA(); break; // … }
String em Switch’s // java 7 String b = "b";
switch(b) { case "b": doSomethingWhenB(); break; // … }
Automatic Resource Management // java 6 BlahResource resource; try {
resource = new BlahResource(); resource.doSomething(); } catch (Exception e) { log.error( “Maoeee”, e ); } finally { try { resource.close(); } catch (BlahResourceException e) { log.error( “Ah haee”, e ); } }
Automatic Resource Management // java 7 try (BlahResource resource =
new BlahResource()) { resource.doSomething(); } catch (Exception e) { log.error( “Maoeee”, e ); }
Numeric Literals // java 6 int thousand = 1000; //
java 7 int thousand = 1_000;
Exception Handling // java 6 try { oneThousandCheckedExceptionsLater(); } catch
(ExceptionOne e) { log.error(“Erro: ", e); } catch (ExceptionTwo e) { log.error(“Erro: ", e); } catch (ExceptionThree e) { log.error(“Erro: ", e); }
Exception Handling // java 7 try { oneThousandCheckedExceptionsLater(); } catch
(ExceptionOne | ExceptionTwo | ExceptionThree e) { log.error(“Erro:”, e); }
NIO 2.0 • Path & Paths • Files • FileSystems
• WatchService
Fork and Join • Dividir para conquistar • ForkJoinTask &
ForkJoinPool
incokedynamic • Recurso da JVM para suportar melhor linguagens com
tipagem dinâmica • java.lang.invoke
PROTIPS™
None
GRÁTIS NA LOJA KINDLE!
Bom e velho Javadoc ☕️
Dúvidas?
Thanks https://speakerdeck.com/caarlos0/as-velhas-novas-do-java-7