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
83
0
Share
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.1k
Serving TUIs over SSH with Go
caarlos0
0
2.2k
construindo uma carreira com opensource
caarlos0
0
530
Introdução ao GoReleaser
caarlos0
0
1.3k
Intro to GoReleaser
caarlos0
0
1.3k
Intro to GoReleaser
caarlos0
0
1.7k
Gerenciando Projetos OpenSource
caarlos0
0
1.6k
GoReleaser: Lessons Learned (hacktoberfest)
caarlos0
0
2k
GoReleaser: Lessons Learned
caarlos0
0
2.9k
Other Decks in Programming
See All in Programming
Swiftのレキシカルスコープ管理
kntkymt
0
210
軽量Java基盤の設計 DIコンテナに頼らない、長期保守と1秒起動の実現 JJUG CCC 2026 Spring
macha64
0
410
柔軟なPDFレイアウトエディタを支える型システム設計 — Discriminated UnionとConditional Typeの実践
minako__ph
4
1.3k
脅威をエンジニアリングの糧にして――現場編 / Turning Threats into Engineering Fuel — Field Edition
nrslib
0
240
inferと仲良くなる10分間
ryokatsuse
1
350
JavaDoc 再入門
nagise
0
250
TypeScriptだけでAIエージェントを作る フロント・エージェント・インフラのフルスタック実践
har1101
6
1.3k
AI時代の仕事技芸論 — ソフトウェア開発で「遊ぶように働く」職人的熟達のすすめ
kuranuki
1
600
正しくソフトウェアを作る、前提を疑うための認知の視点 / doubt-premise
minodriven
17
5.4k
New "Type" system on PicoRuby
pocke
1
430
Oxcを導入して開発体験が向上した話
yug1224
4
280
PHPで使える日時の表現と、その知り方 #frontend_phpcon_do
o0h
PRO
0
180
Featured
See All Featured
How STYLIGHT went responsive
nonsquared
100
6.2k
[SF Ruby Conf 2025] Rails X
palkan
2
1.1k
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
1
140
Designing for Performance
lara
611
70k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
180
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.2k
Speed Design
sergeychernyshev
33
1.8k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
240
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
150
Un-Boring Meetings
codingconduct
0
300
Large-scale JavaScript Application Architecture
addyosmani
515
110k
Build your cross-platform service in a week with App Engine
jlugia
234
18k
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