Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Java 15について軽く/ Java 15 breaf introduction
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Naoki Kishida
September 18, 2020
Programming
270
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
コードで差別化できない時代の ソフトウェアエンジニアリング / Software Engineering in an Era Where Code Doesn’t Differentiate
kishida
2
180
GemmaをJevのように使ってみる / Use Gemma like Jev
kishida
5
790
Java 27新機能 / Java 27 new features
kishida
2
230
ローカルLLMでどこまでコードが書けるか -LLM基礎知識 / How much code can be written on a local LLM - fundamental knowledge
kishida
10
11k
ソフトウェアエンジニアにとっての生成AI - 特性を知って使い倒す / generative ai for software enginner
kishida
7
2.5k
ローカルLLMでどこまでコードが書けるか -縮小版 / How much code can be written on a local LLM Shortened
kishida
2
430
ローカルLLMでどこまでコードが書けるか -拡張版 / How much code can be written on a local LLM Extended
kishida
12
5.7k
Javaの型とAI時代に型が大事な理由 / java types and type in AI era
kishida
2
290
ローカルLLMでどこまでコードが書けるか / How much code can be written on a local LLM
kishida
2
660
Other Decks in Programming
See All in Programming
Event is what happens
moro
2
780
JIS keyboard support in Omarchy
lef237
0
110
Long Living Tokens, Die, Die, Die! (or: The One Ring is Banned in Modern)
sylph01
0
300
機械に任せるテスト、人が見るテスト ⽣成AIで引き直した、運⽤保守フェーズの線引き
dske104
0
190
気持ちぃ〜角丸 Squircle
ryu1013
0
310
コードレビューのボトルネックを"する側"と"される側"の両面から解消する
yub0n
2
1.6k
外から家のPCの電源入れたい!をPHPで解決する
kawashimo0
1
130
見えないものを探る要求要件定義に必要な基本的思考 / invisible-requirement-thinking
minodriven
15
8.5k
自サークルのIdPからログアウトできるようになるまで
taiseiue
1
140
Rでドレミ/Do-Re-Mi_with_R
florets1
0
130
IBM Bob Dojo #1 仕様駆動開発入門
oniak3ibm
PRO
0
390
パズルゲームの作り方 / how to make puzzle games
kaityo256
PRO
2
290
Featured
See All Featured
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
360
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
540
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
490
Optimising Largest Contentful Paint
csswizardry
37
4k
Amusing Abliteration
ianozsvald
1
350
Raft: Consensus for Rubyists
vanstee
142
7.8k
Are puppies a ranking factor?
jonoalderson
2
4.1k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
320
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
203
77k
The Limits of Empathy - UXLibs8
cassininazir
2
720
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
780
Making Projects Easy
brettharned
120
6.8k
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()); }