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
Java 15について軽く/ Java 15 breaf introduction
Search
Naoki Kishida
September 18, 2020
Programming
2
240
Java 15について軽く/ Java 15 breaf introduction
2020/9/18に開催されたJavaコミュ@福岡オンライン飲み会での登壇資料です
Naoki Kishida
September 18, 2020
Tweet
Share
More Decks by Naoki Kishida
See All by Naoki Kishida
LLMベースAIの基本 / basics of LLM based AI
kishida
12
3.3k
Java 24まとめ / Java 24 summary
kishida
3
760
AI時代のプログラミング教育 / programming education in ai era
kishida
25
26k
Java Webフレームワークの現状 / java web framework at burikaigi
kishida
10
2.5k
AI時代に求められるプログラマの能力 / ability of programmer in AI era
kishida
19
13k
Java 23の概要とJava Web Frameworkの現状 / Java 23 and Java web framework
kishida
2
550
Java Webフレームワークの現状 / java web framework
kishida
10
11k
Is Object Oriented nesessary? COSCUP 2024
kishida
0
200
プログラムに組み込みたい人向けLLMの概要 / LLM for programmers
kishida
3
830
Other Decks in Programming
See All in Programming
実践!App Intents対応
yuukiw00w
1
320
DynamoDBは怖くない!〜テーブル設計の勘所とテスト戦略〜
hyamazaki
1
210
MCPで実現するAIエージェント駆動のNext.jsアプリデバッグ手法
nyatinte
3
150
LLMは麻雀を知らなすぎるから俺が教育してやる
po3rin
3
2.2k
サイトを作ったらNFCタグキーホルダーを爆速で作れ!
yuukis
0
420
レガシープロジェクトで最大限AIの恩恵を受けられるようClaude Codeを利用する
tk1351
2
530
Nuances on Kubernetes - RubyConf Taiwan 2025
envek
0
180
LLMOpsのパフォーマンスを支える技術と現場で実践した改善
po3rin
8
970
CEDEC2025 長期運営ゲームをあと10年続けるための0から始める自動テスト ~4000項目を50%自動化し、月1→毎日実行にした3年間~
akatsukigames_tech
0
140
A Gopher's Guide to Vibe Coding
danicat
0
170
[FEConf 2025] 모노레포 절망편, 14개 레포로 부활하기까지 걸린 1년
mmmaxkim
0
850
Honoアップデート 2025年夏
yusukebe
1
830
Featured
See All Featured
Measuring & Analyzing Core Web Vitals
bluesmoon
9
560
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
26k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
8
470
Six Lessons from altMBA
skipperchong
28
4k
The Straight Up "How To Draw Better" Workshop
denniskardys
236
140k
Producing Creativity
orderedlist
PRO
347
40k
How to Ace a Technical Interview
jacobian
279
23k
KATA
mclloyd
32
14k
StorybookのUI Testing Handbookを読んだ
zakiyama
30
6k
The Invisible Side of Design
smashingmag
301
51k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
31
2.2k
Mobile First: as difficult as doing things right
swwweet
223
9.9k
Transcript
Java 15を軽く LINE Fukuoka きしだ なおき 2020/9/18 Javaコミュ@福岡オンライン飲み会
自己紹介 • きしだ なおき(@kis) • LINE Fukuoka • 最近 洗濯機を買って、ベランダ置きの
洗濯機は台風で汚れるということを知る
Java 15 • 2020/9/15リリース • non-LTS • 次は17(Sept.2021) • 14のJEP
http://openjdk.java.net/projects/jdk/15/
Java 15 • 2020/9/15リリース • non-LTS • 次は17(Sept.2021) • 14のJEP
• 新規は4つ • 更新6 • 機能削除4 http://openjdk.java.net/projects/jdk/15/ 新規 新規 新規 新規
JEP • 言語仕様 • Sealed Classes(Preview) • Text Blocks(Standard) •
Pattern Matching for instanceof (Second Preview) • Records(Second Prevew) • API • Foreign Memory Access (Second Incubator) • Hidden Classes • Reinplement the Legacy DatagramSocket API • Edwards-Curve Digital Signature Algorithm • Remove the Nashorn JS Engine • JVM • Disable and Deprecate Biased Locking • ZGC(Production) • Shenandoah(Production) • Deprecate RMI Activation • OpenJDK • Remove Solaris and SPARK Ports • Tool • remove RMI stub compiler
Sealed Classes • 継承できるクラスを限定する public abstract sealed class Shape permits
Circle, Rectangle, Square {...}
現状では使い道なし • 本当は次のように書けるといい String getName(Shape s) { if (s instanceof
Circle) { return "円"; } else if (s instanceof Rectangle) { return "四角"; } else if (s instanceof Square) { return "正方形"; } }
swtichでパターンマッチングが使えるように なると便利 • Pattern matching for switchが導入されると、次のような switchがdefaultなしで書けるようになる String getName(Shape
s) { switch (s) { case Circle c -> return "円"; case Rectangle r -> return "四角"; case Square q -> return "正方形"; } }
Text Blocks(Standard) • 複数行のテキスト • ダブルクオート3つで囲む • Java 14から変更なし """
<head> <title>Java 14</title> </head> """
Records(2nd Preview) • データをやりとりするための型 • イミュータブル(値が変更できない) • 名前付きタプル • Case
class(Scala) やData class(Kotlin), @Value(Lombok)
定義 public record Rec(String name, int count) {} public class
Rec extends Record { private final String name; private final int count; Rec(String name, int count) { this.name = name; this.count = count; } String name() { return name; } String count() { return count; } // toString, equals, hashCode }
Pattern Matching for instanceof(2nd Preview) • Kotlinのスマートキャストのような機能 Object o =
"test"; if (o instanceof String s) { System.out.println(s.length()); } Object o = "test"; if (o instanceof String) { String s = (String) o; System.out.println(s.length()); }