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
JJUG,JJUG CCCについて、あとJava21 / JJUG, JJUG CCC, and Java 21
Search
Naoki Kishida
July 19, 2023
Programming
1
440
JJUG,JJUG CCCについて、あとJava21 / JJUG, JJUG CCC, and Java 21
2023/7/19に行われたJJUG CCC 2023 Spring報告会 in 福岡での登壇資料です。
https://javaq.connpass.com/event/288665/
Naoki Kishida
July 19, 2023
Tweet
Share
More Decks by Naoki Kishida
See All by Naoki Kishida
Java 22 Overview
kishida
1
210
Is Object-Oriented nessesary?
kishida
0
47
オブジェクト指向は必要なのか / Is object-oriented needed?
kishida
31
22k
AI時代を乗り切る実装力をつけよう / Get avility of implementation beyond AI era
kishida
2
4.7k
AI時代を生き抜くために処理をちゃんと書けるようになろう / write a executable process for AI era
kishida
23
13k
Javaは今どうなっているの? / how about java now
kishida
14
19k
動くコードを書こう / let's code a process
kishida
24
7.2k
Java 21の概要 / outline of Java 21
kishida
10
6.1k
エンジニアはLLMとどう付き合うか / How engineer get along with LLM
kishida
19
14k
Other Decks in Programming
See All in Programming
VS Code をプロダクトにどう取り込むか
onomax
1
800
Docker_OSS_ホスティング入門
satokoki645
0
130
Revisiting the Hotwire Landscape after Turbo 8 @ RailsConf 2024, Detroit
marcoroth
3
570
The Cutting Edge Of Versioning (LambdaConf 2024)
chriskrycho
0
240
検証も兼ねて個人開発でHonoとかと向き合った話
hanetsuki
1
1.4k
“Seeing Like a Programmer”—Resiliency, Limits, and Moral Hazards in Software Engineering (LambdaConf 2024)
chriskrycho
0
390
Jetpack Composeとデザインシステム
rmakiyama
0
180
『Railsオワコン』と言われる時代に、なぜブルーモ証券はRailsを選ぶのか
free_world21
2
420
Build Apps for iOS, Android & Desktop in 100% Kotlin With Compose Multiplatform (mDevCamp 2024)
zsmb
0
500
Inner Source@DB: Eine Geschichte über Open-Source-Praktiken im DB Konzern
morl99
1
100
How to improve maintainability and readability of your automated tests? ( #scrumniigata )
teyamagu
PRO
1
110
TypeScriptの型とパフォーマンス (TSKaigi 2024)
ypresto
13
3.5k
Featured
See All Featured
GitHub's CSS Performance
jonrohan
1025
450k
How to name files
jennybc
65
93k
The Mythical Team-Month
searls
217
42k
Visualization
eitanlees
137
14k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
245
20k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
20
1.8k
A Modern Web Designer's Workflow
chriscoyier
689
190k
[RailsConf 2023] Rails as a piece of cake
palkan
28
4k
What's in a price? How to price your products and services
michaelherold
238
11k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
26
2.3k
StorybookのUI Testing Handbookを読んだ
zakiyama
13
4.6k
Rebuilding a faster, lazier Slack
samanthasiow
74
8.3k
Transcript
JJUG / JJUG CCCについて あと、Java 21の紹介 2023/7/19 JJUG CCC 2023
Spring 報告会@福岡 LINE Fukuoka きしだ なおき
07/20/2023 2 自己紹介 • きしだ なおき • LINE Fukuoka •
twitter: @kis • 「プロになるJava」という Java入門書を書いてます
07/20/2023 3 JJUGについて • 日本Java User Group • Java 技術の向上・発展、開発者の支援を目的とした任意団体
• 2007年4月に発足 • Doorkeeper登録者数12107人(6/4時点) • 活動 • JJUG CCC(年2回, Spring / Fall) • ナイトセミナー(月1回) • Java仕様勉強会(月1回) • 地方イベントへの講師派遣(今回のirofさんも)
JJUG CCC • Cross Community Conference • 2007年当時、Seasar2やJSUGなどプロダクトごとのコミュニティが 活発であり、またGroovyやJRubyなどJVM言語も盛り上がっていたた め、Java/JVMをテーマに各団体の協力でイベントを開催
• JJUG CCC 2023 Spring • 初のオン・オフハイブリッド開催 • 会場参加約300名
Java 21 • 9/19リリース予定 • LTS • 主な機能 • パブリックスタティックヴォイドメインが簡潔に!(Preview)
• String Templateで文字列に式を埋め込み(Preview) • 実用的なパターンマッチングが標準に! • Record Patterns / Pattern Matching for switch • Virtual Threadが標準に!
パブリックスタティックヴォイドメインが簡潔に! • クラスの定義が不要に • mainメソッドの引数を省略可能に • インスタンスメソッドでもOK • publicじゃなくてもOK(privateだけダメ) •
説明に完全なコードを入れやすくなった • →はWEB+DB PRESS 135の原稿 • Preview機能 • --enable-preview -source 21が必要
String Templateで文字列に式を埋め込み • STR.”今日は\{LocalDate.now()}です” import static java.util.FormatProcessor.FMT; void main() {
for (int i = 1; i <= 9; i++) { for (int j = 1; j <= 9; j++) { System.out.print(FMT."\{i}*\{j}=%2d\{i*j} "); } System.out.println(); } }
実用的なパターンマッチングが標準に! • JEP 440 Record Patterns • JEP 441 Pattern
Matching for switch sealed interface Op permits Output, Goto {} // 命令 record Output(String message) implements Op {} record Goto(int no) implements Op {} List<Op> codes = List.of( // プログラム new Output("hello"), new Output("world"), new Goto(0)); int counter = 0; void clock() { // 命令実行 counter++; switch(codes.get(counter-1)) { // 命令ごとの分岐 case Output(var msg) -> System.out.println(msg); case Goto(var no) -> counter = no; } }
Virtual Threadが標準に! • いままでのスレッドは高機能 • しかしサーバーで複数リクエストを処理することが主な利用目的 • ネットワークの待ち時間が大きい • スレッドは何もしていない
• 無駄にリソースを食う • OSスレッドを複数リクエストで使いまわすことが可能 • 軽量化
まとめ • みんなもJJUG CCCに行こう • 登壇もしよう • 登壇初心者枠あり • 交通費出るはず(要確認)
• Java 21はイイゾ