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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
710
How to find problem causes and performance improvement
muumuumuumuu
6
4.3k
Other Decks in Technology
See All in Technology
AWSシリコン最前線 〜AI時代のチップ選択を読み解く〜
htokoyo
2
410
非エンジニアがClaudeと挑んだ「1ヶ月間プロダクト30本ノック」
askokc
0
270
AI駆動開発が変える、大規模開発の前提 ーHuman in the Loop から Human on the Loop へ / AIE2026
visional_engineering_and_design
30
24k
エンジニアリング戦略の作り方 / Crafting Engineering Strategy
iwashi86
19
6.4k
新しいVibe Codingと”自走”について
watany
5
290
AIの性能が向上しても未解決な組織の重大問題は何か?/An Unsolved Organizational Problem in the Age of AI
moriyuya
3
600
AIっぽい文章を採点して人間らしく直すアプリを作ってみた
yama3133
2
120
実装は速くなった、レビューはどうする? ― 自身のレビューをAIで再現させるサーヴァントエンジニアリングのすゝめ / Implementation got faster. So what about reviews? — An invitation to Servant Engineering: Recreating your own code reviews with AI
nrslib
8
4.6k
タクシーアプリ『GO』の実践的データ活用
mot_techtalk
3
190
2026 TECHFRESH 畢業分享會 - AI-Native 重塑軟體工程與虛擬講師
line_developers_tw
PRO
0
720
2026TECHFRESH畢業分享會 - Lightning Talk - 打造精準高效的 MCP 設計模式與測試實務
line_developers_tw
PRO
0
720
JSAI2026 オーガナイズドセッションOS-27「不動産とAI」趣旨説明 / JSAI2026 Organized Session OS-27 “Real Estate and AI”: Statement of Purpose
ykiyota
0
220
Featured
See All Featured
Java REST API Framework Comparison - PWX 2021
mraible
34
9.3k
Building an army of robots
kneath
306
46k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
280
XXLCSS - How to scale CSS and keep your sanity
sugarenia
250
1.3M
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
Technical Leadership for Architectural Decision Making
baasie
3
400
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
250
Accessibility Awareness
sabderemane
1
140
Into the Great Unknown - MozCon
thekraken
41
2.6k
Prompt Engineering for Job Search
mfonobong
0
340
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2k
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͔Θ͍͍ʂʂ
͋Γ͕ͱ͏͍͟͝·ͨ͠