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
Trap Questions in Java and Obj-C
Search
417.72KI
December 03, 2019
Programming
1
280
Trap Questions in Java and Obj-C
417.72KI
December 03, 2019
Tweet
Share
More Decks by 417.72KI
See All by 417.72KI
iTunes・おぼえていますか〜ScriptingBridge今昔物語〜
417_72ki
1
31
The history of entry-point in iOS app Development
417_72ki
0
380
R.swift to Asset Symbols
417_72ki
0
270
Refactor with using `available` and `deprecated`
417_72ki
3
620
CLIツールにSwift Concurrencyを適用させようとしている話
417_72ki
3
410
CI with Danger-Swift
417_72ki
1
200
Graduation from Playground beginner
417_72ki
3
910
ダックタイピングとidでUserDefaultsをモック化する
417_72ki
2
2.5k
Mockable UserDefaults with Duck typing
417_72ki
0
890
Other Decks in Programming
See All in Programming
KMP와 kotlinx.rpc로 서버와 클라이언트 동기화
kwakeuijin
0
300
“あなた” の開発を支援する AI エージェント Bedrock Engineer / introducing-bedrock-engineer
gawa
3
130
EC2からECSへ 念願のコンテナ移行と巨大レガシーPHPアプリケーションの再構築
sumiyae
3
590
Azure AI Foundryのご紹介
qt_luigi
1
210
混沌とした例外処理とエラー監視に秩序をもたらす
morihirok
13
2.3k
HTML/CSS超絶浅い説明
yuki0329
0
190
return文におけるstd::moveについて
onihusube
1
1.4k
オニオンアーキテクチャを使って、 Unityと.NETでコードを共有する
soi013
0
370
Alba: Why, How and What's So Interesting
okuramasafumi
0
210
PHPで学ぶプログラミングの教訓 / Lessons in Programming Learned through PHP
nrslib
4
1.1k
盆栽転じて家具となる / Bonsai and Furnitures
aereal
0
1.9k
.NETでOBS Studio操作してみたけど…… / Operating OBS Studio by .NET
skasweb
0
120
Featured
See All Featured
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
28
4.5k
Designing for Performance
lara
604
68k
Building Better People: How to give real-time feedback that sticks.
wjessup
366
19k
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
Designing on Purpose - Digital PM Summit 2013
jponch
116
7.1k
A Modern Web Designer's Workflow
chriscoyier
693
190k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Git: the NoSQL Database
bkeepers
PRO
427
64k
Gamification - CAS2011
davidbonilla
80
5.1k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
3
360
StorybookのUI Testing Handbookを読んだ
zakiyama
28
5.4k
How to Ace a Technical Interview
jacobian
276
23k
Transcript
4XJGU,PUMJOѪձ 7PM !(.0ϖύϘ
4XJGUͱ,PUMJO
4XJGUͱ,PUMJO
+BWBͱ0CKFDUJWF$ ͷΛ͠·͢
ͳΜͰࠓ͞Β+BWB0CK$
ͳΜͰࠓ͞Β+BWB0CK$ w ࠓͷ࣌ΞϓϦ4XJGU,PUMJOͰॻ͘ͷ͕ͨΓલ w ࠓͲ͖+BWB0CK$ͳΜͯ৮ΒΜΖ
Ռͨͯ͠ຊʹͦ͏ͩΖ͏͔ʁ
Ռͨͯ͠ຊʹͦ͏ͩΖ͏͔ʁ w 044ϥΠϒϥϦϦϦʔε͞Εͨ࣌ϥΠϒϥϦͷಛ ੑ্+BWB0CK$Ͱॻ͔Ε͍ͯΔͷ·ͩ·ͩଟ͍ w ࣮Λ֬ೝͨ͠Γ13Λग़ͨ͠Γ͢ΔͳΒͬͺΓͦͷล ͷࣝඞཁ
ͱ͍͏͜ͱͰ
ҙ֎ͱҾ͔͔ͬΔʂʁ ݴޠ༷ΫΠζ +BWB0CKFDUJWF$ฤ
w 5BLVIJSP.VUBBLB໊Նر ,* w 4& 8FC J04 "OESPJE ৽ਓݚमߨࢣFUD
J04 डୗ։ൃ J04 ࣗࣾ։ൃ ࠓίί w 5XJUUFS 2JJUB@LJ (JU)VC,* w 4XJGUѪձࢀՃप ͏ΜΧϨʔ ͓લ୭Α
#VJME$POpHTXJGU ελʔ͍ͩ͘͞
ݴޠ༷ΫΠζ w +BWB w 0CKFDUJWF$
+BWBฤ
ୈ
࣍ͷίʔυͷಈ͖Ͳ͏ͳΔʁ
࣍ͷίʔυͷಈ͖Ͳ͏ͳΔʁ public class Sample { public static void main(String... args)
{ while (false) { System.out.println("hoge"); } } }
࣍ͷίʔυͷಈ͖Ͳ͏ͳΔʁ public class Sample { public static void main(String... args)
{ while (false) { System.out.println("hoge"); } } } lIPHFz͕ճ͚ͩग़ྗ͞ΕΔ Կى͖ͳ͍ ίϯύΠϧΤϥʔ ࣮ߦ࣌Τϥʔ
࣍ͷίʔυͷಈ͖Ͳ͏ͳΔʁ public class Sample { public static void main(String... args)
{ while (false) { System.out.println("hoge"); } } } lIPHFz͕ճ͚ͩग़ྗ͞ΕΔ Կى͖ͳ͍ ίϯύΠϧΤϥʔ ࣮ߦ࣌Τϥʔ
ղઆ public class Sample { public static void main(String... args)
{ while (false) { System.out.println("hoge"); } } } 6OSFBDIBCMFDPEF
ୈ
ୈΛ౿·͑ͯ public class Sample { public static void main(String... args)
{ while (false) { System.out.println("hoge"); } } }
࣍ͷίʔυͷಈ͖Ͳ͏ͳΔʁ public class Sample { public static void main(String... args)
{ do { System.out.println("hoge"); } while (false); } }
࣍ͷίʔυͷಈ͖Ͳ͏ͳΔʁ public class Sample { public static void main(String... args)
{ do { System.out.println("hoge"); } while (false); } } lIPHFz͕ճ͚ͩग़ྗ͞ΕΔ Կى͖ͳ͍ ίϯύΠϧΤϥʔ ࣮ߦ࣌Τϥʔ
࣍ͷίʔυͷಈ͖Ͳ͏ͳΔʁ public class Sample { public static void main(String... args)
{ do { System.out.println("hoge"); } while (false); } } lIPHFz͕ճ͚ͩग़ྗ͞ΕΔ Կى͖ͳ͍ ίϯύΠϧΤϥʔ ࣮ߦ࣌Τϥʔ
public class Sample { public static void main(String... args) {
do { System.out.println("hoge"); } while (false); } } ղઆ EPXIJMFࣄޙධՁ ճॲཧͨ͠ޙʹ݅ࣜΛఆ
ղઆ ॲཧ ݅ XIJMF ॲཧ ݅ EPXIJMF
0CKFDUJWF$ฤ
ୈ
Կ͕ग़ྗ͞ΕΔʁ
Կ͕ग़ྗ͞ΕΔʁ if (@0) { NSLog(@"true"); } else { NSLog(@"false"); }
Կ͕ग़ྗ͞ΕΔʁ if (@0) { NSLog(@"true"); } else { NSLog(@"false"); }
USVF GBMTF
Կ͕ग़ྗ͞ΕΔʁ if (@0) { NSLog(@"true"); } else { NSLog(@"false"); }
USVF GBMTF
ղઆ w @0</4/VNCFSOVNCFS8JUI*OU>ͷ4ZOUBY4VHBS w /4/VNCFSΦϒδΣΫτ w ΦϒδΣΫτͱͯ͠ଘࡏ͢ΔͨΊɺ USVFͱͯ͠ఆ͞ΕΔ w @NOಉ༷
ୈ
Կ͕ग़ྗ͞ΕΔʁ
Կ͕ग़ྗ͞ΕΔʁ [ "hoge", "fuga", null, "foo", "bar" ] TBNQMFKTPO NSArray
*array = ... // JSONΛಡΈࠐΉॲཧ if (array[2]) { NSLog(@"true"); } else { NSLog(@"false"); }
Կ͕ग़ྗ͞ΕΔʁ USVF GBMTF [ "hoge", "fuga", null, "foo", "bar" ]
TBNQMFKTPO NSArray *array = ... // JSONΛಡΈࠐΉॲཧ if (array[2]) { NSLog(@"true"); } else { NSLog(@"false"); }
Կ͕ग़ྗ͞ΕΔʁ USVF GBMTF [ "hoge", "fuga", null, "foo", "bar" ]
TBNQMFKTPO NSArray *array = ... // JSONΛಡΈࠐΉॲཧ if (array[2]) { NSLog(@"true"); } else { NSLog(@"false"); }
ղઆ w /4"SSBZͷίϨΫγϣϯʹOJMΛೖΕΔ͜ͱ͕Ͱ͖ͳ ͍ w େମखஈͱͯ͠/4/VMMͱ͍͏ΫϥεΛ͏ w ͜ͷ࣌BSSBZ<>͔ΒऔΓग़͞ΕΔͷ</4/VMMOVMM>ͱ͍͏ γϯάϧτϯΦϒδΣΫτ w
ΦϒδΣΫτͳͷͰUSVFͱͯ͠ఆ͞ΕΔ
/4/VMMͱOJM NSLog(@"%@", nil); // -> (null) NSLog(@"%@", [NSNull null]); //
-> <null> ྻʹฆΕ͍ͯΔOVMMΑ͘ݟམͱ͕ͪ͠
͜ΜͳΜͬͯͯԿʹͳΔʁ
͜ΜͳΜͬͯͯԿʹͳΔʁ w +BWB w 0$+1 0SBDMFೝఆࢿ֨ Ͱ͜͏͍͏͕ग़͞ΕΔ w ࣮Ͱ͏ҙຯ໓ଟʹແ͍͕ɺ ϨΨγʔͳγεςϜͰۃكʹฆΕࠐΜͰΔ
w ϦʔμϒϧίʔυͬͯͬͯΔʁ
͜ΜͳΜͬͯͯԿʹͳΔʁ w 0CK$ w ҙ֎ͱݟམͱ͕ͪ͠ w ͜ͷखͷޡղ͔ΒੜͣΔόά͕࣮ࡍʹ͋ͬͨ w 4XJGUͷϦϓϨʔεͰఆͱҧ͏ಈ͖Λ͢Δͱ͔ w
ಛʹྻʹฆΕࠐΉOVMM͋Δ͋Δ
͜ΜͳΜͬͯͯԿʹͳΔʁ w ͍ͭͰʹ w ৽ਓݚमͰυϠΕΔ
·ͱΊ w ϨΨγʔݴޠͷཧղϦϓϨʔεͷڧ͍ຯํ w ࢥΘ͵όάΛੜ·ͳ͍ͨΊʹݴޠ༷ͷཧղେ w ࣮ͰΘͳ͍͔ࣝͩΒͬͯܰࢹ͠ͳ͍Α͏ʹ
ྑ͍͓Λʂ✋