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
250
2
Share
Java 15について軽く/ Java 15 breaf introduction
2020/9/18に開催されたJavaコミュ@福岡オンライン飲み会での登壇資料です
Naoki Kishida
September 18, 2020
More Decks by Naoki Kishida
See All by Naoki Kishida
Javaの型とAI時代に型が大事な理由 / java types and type in AI era
kishida
2
68
ローカルLLMでどこまでコードが書けるか / How much code can be written on a local LLM
kishida
2
420
ローカルLLM基礎知識 / local LLM basics 2025
kishida
30
17k
AIエージェントでのJava開発がはかどるMCPをAIを使って開発してみた / java mcp for jjug
kishida
5
1.2k
AIの弱点、やっぱりプログラミングは人間が(も)勉強しよう / YAPC AI and Programming
kishida
13
6.7k
海外登壇の心構え - コワクナイヨ - / how to prepare for a presentation abroad
kishida
2
170
Current States of Java Web Frameworks at JCConf 2025
kishida
0
1.8k
AIを活用し、今後に備えるための技術知識 / Basic Knowledge to Utilize AI
kishida
27
7.4k
LLMベースAIの基本 / basics of LLM based AI
kishida
13
3.7k
Other Decks in Programming
See All in Programming
プラグインで拡張される Context をtype-safe にする難しさと設計判断
kazupon
2
480
サーバーレスで作る、動画データ管理基盤
oyasumipants
0
320
メソッドのジェネリクスでGoの夢は広がるか? / Kyoto.go #65
utgwkk
0
230
Inside Stream API
skrb
1
440
密結合なバックエンドから TypeScript のコードを生成する
kemuridama
1
390
AIとRubyの静的型付け
ukin0k0
0
480
The Arts and Crafts of Work in the AI Era — Toward Mastery in Software Development
kuranuki
1
680
DynamoDBには集計系のクエリがないけどなんとかしたい
musan
1
100
Stage 3 Decorators でできること / できないこと / TSKaigi 2026
susisu
1
1.4k
RTSPクライアントを自作してみた話
simotin13
0
390
AIチームを指揮するOSS「TAKT」活用術 / How to Use “TAKT,” an OSS Tool for Orchestrating AI Teams
nrslib
6
760
Oxlintのカスタムルールの現況
syumai
5
920
Featured
See All Featured
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
300
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
390
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.9k
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
130
Optimising Largest Contentful Paint
csswizardry
37
3.7k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
180
Measuring & Analyzing Core Web Vitals
bluesmoon
9
850
A Soul's Torment
seathinner
6
2.9k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
190
Art, The Web, and Tiny UX
lynnandtonic
304
21k
AI: The stuff that nobody shows you
jnunemaker
PRO
7
670
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
280
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()); }