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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Fukui Atsuko
May 30, 2018
Technology
1.5k
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
AIは推し活である。
kurazuuuuuu
2
1k
キャリアLT今日までそして明日から
kentapapa
1
120
カンファレンスに参加した後の浮遊感とセルフケア
pauli
0
220
生成AIを使って「人が」考える技術 ― AI時代の人機共想と実践ノウハウ|UNITT AC2026
ishiirikie
0
430
1人アドミンな私はAWSアカウント申請をSlackで完結したい!
ysuzuki
0
100
TiDBファミリーにDWHが新登場!! TiDB最新情報 / TiDB update 202609
yoshiakiyamasaki
0
160
Swap and Memory Reclaim - Squeezing Out More RAM
ennael
PRO
1
1.2k
PQC移行の今 -- IETF からみた現在地
satokan
4
650
可視化から始めたAI駆動開発_ochi_ver1.01 / AI-Driven Development Starting with Visualization_ver1.01
yayoi_dd
0
100
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
16
120k
CI/CDではもう遅い - 人とAIが迂回しないDevSecOps Verify基盤の再設計 -
kintotechdev
1
420
Azure Copilot Resiliency Agentをいろいろ試してみる
tomokusaba
0
140
Featured
See All Featured
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
340
New Earth Scene 8
popppiees
4
2.6k
Exploring anti-patterns in Rails
aemeredith
4
520
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
530
Unsuck your backbone
ammeep
672
58k
Navigating Team Friction
lara
192
16k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
3k
Building AI with AI
inesmontani
PRO
1
1.3k
Site-Speed That Sticks
csswizardry
13
1.5k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
290
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
3.1k
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͔Θ͍͍ʂʂ
͋Γ͕ͱ͏͍͟͝·ͨ͠