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
こんな時どう書くの? 逆引きKotlin入門
Search
Fukui Atsuko
May 30, 2018
Technology
1.5k
3
Share
こんな時どう書くの? 逆引き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
710
How to find problem causes and performance improvement
muumuumuumuu
6
4.3k
Other Decks in Technology
See All in Technology
AIが変えた"品質の守り方"
kkakizaki
13
5.5k
Spring AI × MCP 入門〜AIエージェントへのツール公開、境界設計から始める最小構成 〜
yuyamiyamoto
0
190
Kaggle未経験社員をメダリストに育てる「AIドラゴン桜」
lycorptech_jp
PRO
0
680
海外カンファレンス「JavaOne」参加レポート ユーザー系IT企業における目的・成果/JavaOne Report Purpose and Results in the User IT Company
muit
0
120
Oracle AI Database@Google Cloud:サービス概要のご紹介
oracle4engineer
PRO
6
1.5k
個人AIからチームAIへ:開発における品質と生産性の再設計
moongift
PRO
0
330
さきさん文庫の書籍ができるまで
sakiengineer
0
320
はじめてのDatadog
kairim0
0
240
関西に縁あるMicrosoft MVPsが語るCopilotの未来
kasada
0
760
Strands Agents超入門
kintotechdev
1
150
大規模災害時でも高い信頼性を維持するアプリケーション基盤の実現/nikkei-tech-talk46
nikkei_engineer_recruiting
0
120
イベントストーミングとKiroの仕様駆動開発で実現する要件の認識合わせプロセス
syobochim
7
980
Featured
See All Featured
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
420
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
930
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
830
Optimising Largest Contentful Paint
csswizardry
37
3.7k
Are puppies a ranking factor?
jonoalderson
1
3.4k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.8k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
190
The Pragmatic Product Professional
lauravandoore
37
7.3k
Statistics for Hackers
jakevdp
799
230k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
380
Facilitating Awesome Meetings
lara
57
6.9k
Bash Introduction
62gerente
615
210k
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͔Θ͍͍ʂʂ
͋Γ͕ͱ͏͍͟͝·ͨ͠