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
こんな時どう書くの? 逆引きKotlin入門
Search
Fukui Atsuko
May 30, 2018
Technology
1.6k
3
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
こんな時どう書くの? 逆引きKotlin入門
2018/5/30 に開催される「Kotlin愛好会 vol1」向けの登壇資料です。
Kotlin初心者の方を対象に、逆引きのreferenceになるようなお話をします。
Fukui Atsuko
May 30, 2018
More Decks by Fukui Atsuko
See All by Fukui Atsuko
Kotlin導入作戦
muumuumuumuu
4
570
KotlinとReduxをAndroidアプリに導入したら
muumuumuumuu
6
4.8k
Sometimes Swift confuses Kotlin engineers.
muumuumuumuu
0
720
How to find problem causes and performance improvement
muumuumuumuu
6
4.4k
Other Decks in Technology
See All in Technology
形式手法を使って仕様をコーディングしよう
mikanichinose
0
160
AIに書かせて、プラットフォームで縛る ― EKSプラットフォームで実践した責任境界と権限設計
elmodev09
1
1.1k
【Findyテック文化祭ワークショップ】新卒エンジニア&採用担当と作る、 なりたい姿と今やるべき一歩
dip_tech
PRO
0
150
The kernel report
ennael
PRO
1
200
営業オントロジーの作り方と、エージェントからの辿り方 ── ナレッジワークの現場から
kworkdev
PRO
1
230
ビジネスを止めない技術的負債の返済のための戦略とその手法 - 技術的負債と向き合う / Complexity and Simplicity
soudai
PRO
2
430
猫でもわかるKiro Web
kentapapa
1
160
企業の現実世界をグラフで写し取る
sansantech
PRO
0
240
OpenClawでAzure DevOpsのWiki更新を自動化する - クラウドAIだけでは届かない場所へ
yutakaosada
0
140
高負荷プロダクション環境におけるAWS Lambdaのリアル 〜スケールとコストを左右する実行ライフサイクルの技術仕様〜
maimyyym
2
850
私の推しは「聞いてから進む」AIです -AI-DLCに一人でアプリを作らせた話
yama3133
1
160
AIは爆速なのに、私が詰まっていた話 ― 音声入力と鳴くマスコットでボトルネックを削る
yama3133
0
310
Featured
See All Featured
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
560
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
23k
From π to Pie charts
rasagy
1
380
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
2
930
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
18k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
8k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.6k
Become a Pro
speakerdeck
PRO
31
6.3k
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
5
750
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
580
Balancing Empowerment & Direction
lara
6
1.3k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
750
Transcript
͜Μͳ࣌Ͳ͏ॻ͘ͷʁ ٯҾ͖Kotlinೖ 2018/5/30 KotlinѪձ vol1 Atsuko FUKUI
Agenda • ࣗݾհ • ຊͷΰʔϧ • ͜Μͳ࣌Ͳ͏ॻ͘ͷʁٯҾ͖Kotlinೖ • ·ͱΊ
ࣗݾհ • Ҫರࢠ / Fukui Atsuko • @muumuumuumuu • Android
Developer • Mercari, Inc.
ຊͷΰʔϧ • ؾܰʹKotlinΛॻ͖࢝ΊΒΕΔΑ͏ʹٯҾ͖ͷ ReferenceΛఏڙ͢Δ • Kotlinॳ৺ऀ͚Λఆ • Kotlin͢Ͱʹॻ͖ͳΕ͍ͯΔਓʮΘ͔Δʯ ʮKotlin͔Θ͍͍ʯͱࢥ͍ͳ͕Βฉ͍͍ͯͯԼ͞ ͍
• #love_kotlin ͷϋογϡλά͋Γ·͢Αʂ
͜Μͳ࣌Ͳ͏ॻ͘ͷʁ ٯҾ͖Kotlinೖ
มͷએݴ(1/3) • val / var म০ࢠͰม͕એݴͰ͖Δ • valfinal, var࠶ೖՄ
มͷએݴ(2/3) • ܕਪΛαϙʔτ • Φϓγϣφϧ • ܕͷએݴ࣌ʹ໌ࣔతʹ?Λ͚ͭͳ͍ͱnullΛ ڐ༰͠ͳ͍
มͷએݴ(3/3) • Ϋϥεʹଐ͢Δඞཁͳ͍(= ୈ1ڃΦϒδΣ Ϋτͱͯ͠એݴͰ͖Δ) • ఆʹconst
ؔͷએݴ(1/2) • funम০ࢠͰ͕ؔએݴͰ͖Δ • ҾͱΓͷࢦఆҎԼͷ௨Γ • த͕1ߦͰ͔͚Δ߹=Ͱܨ͛ͯreturnΛ লུͰ͖Δ
ؔͷએݴ(2/2) • σϑΥϧτҾͱ໊લ͖ҾΛαϙʔτ
݅ࣜ if (1/3) • Kotlinʹ͓͍ͯifࣜ(expression) • จ(statement)Ͱͳ͍ • ͭ·ΓΛฦ͢͜ͱ͕Ͱ͖Δ
݅ࣜ if (2/3) • ʢ೦ͳ͕Βʣࡾ߲ԋࢉࢠαϙʔτ͞Εͯ ͍ͳ͍ • ΤϧϏεԋࢉࢠ( ?: )αϙʔτ͞Ε͍ͯΔ
݅ࣜ if (3/3) • null νΣοΫείʔϓؔͱΦϓγϣφϧ ͷΈ߹Θ͕ͤΑ͘ΘΕΔ
݅ࣜ when (1/2) • if ಉ༷ʹwhenࣜ • whenͷޙΖͷ()ͷ͕ൺֱͷରʹͳΔ
݅ࣜ when (2/2) • whenͷޙΖͷ() ͳͯ͘OK • ൺֱରͷ͕ෳ͋Δ߹ʹศར
·ͱΊ
·ͱΊ • มͷએݴɺؔͷએݴɺ݅ࣜ • Kotlin͔Θ͍͍ʂʂ
͋Γ͕ͱ͏͍͟͝·ͨ͠