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
250
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基礎知識 / local LLM basics 2025
kishida
15
4.6k
AIエージェントでのJava開発がはかどるMCPをAIを使って開発してみた / java mcp for jjug
kishida
4
730
AIの弱点、やっぱりプログラミングは人間が(も)勉強しよう / YAPC AI and Programming
kishida
10
5.1k
海外登壇の心構え - コワクナイヨ - / how to prepare for a presentation abroad
kishida
2
87
Current States of Java Web Frameworks at JCConf 2025
kishida
0
1.5k
AIを活用し、今後に備えるための技術知識 / Basic Knowledge to Utilize AI
kishida
24
6.8k
LLMベースAIの基本 / basics of LLM based AI
kishida
13
3.4k
Java 24まとめ / Java 24 summary
kishida
3
790
AI時代のプログラミング教育 / programming education in ai era
kishida
25
26k
Other Decks in Programming
See All in Programming
仕様がそのままテストになる!Javaで始める振る舞い駆動開発
ohmori_yusuke
8
4.6k
Building AI with AI
inesmontani
PRO
1
240
関数の挙動書き換える
takatofukui
4
740
Chart.jsで長い項目を表示するときのハマりどころ
yumechi
0
140
TypeScript 5.9で使えるようになった import defer でパフォーマンス最適化を実現する
bicstone
1
210
スタートアップを支える技術戦略と組織づくり
pospome
7
7.4k
r2-image-worker
yusukebe
1
170
イベントストーミングのはじめかた / Getting Started with Event Storming
nrslib
1
650
Amazon Bedrock Knowledge Bases Hands-on
konny0311
0
150
2026年向け会社紹介資料
misu
0
250
Querying Design System デザインシステムの意思決定を支える構造検索
ikumatadokoro
1
1.2k
Reactive Thinking with Signals and the new Resource API
manfredsteyer
PRO
0
110
Featured
See All Featured
KATA
mclloyd
PRO
32
15k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3.2k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Six Lessons from altMBA
skipperchong
29
4.1k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
11
940
Leading Effective Engineering Teams in the AI Era
addyosmani
8
1.1k
Designing for Performance
lara
610
69k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.1k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
670
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
10
680
[RailsConf 2023] Rails as a piece of cake
palkan
57
6.1k
Optimizing for Happiness
mojombo
379
70k
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()); }