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
JLS myths ~ if-then-else statement ~
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
HASUNUMA Kenji
October 01, 2016
Programming
0
38
JLS myths ~ if-then-else statement ~
HASUNUMA Kenji
October 01, 2016
Tweet
Share
More Decks by HASUNUMA Kenji
See All by HASUNUMA Kenji
Jakarta EE: The First Parts
khasunuma
0
51
Life of our small product
khasunuma
0
36
How to adapt MicroProfile API for generic Web applications
khasunuma
0
35
Overviewing Admin Console
khasunuma
0
34
Introduction to MicroProfile Metrics
khasunuma
0
57
Basic method for Java EE Web Profile
khasunuma
0
32
Introduction to JCA and MDB
khasunuma
0
82
Collections Framework Begineers Guide 2
khasunuma
0
73
Introduction to Date and Time API 4
khasunuma
0
68
Other Decks in Programming
See All in Programming
AI前提で考えるiOSアプリのモダナイズ設計
yuukiw00w
0
220
OSSとなったswift-buildで Xcodeのビルドを差し替えられるため 自分でXcodeを直せる時代になっている ダイアモンド問題編
yimajo
3
580
HTTPプロトコル正しく理解していますか? 〜かわいい猫と共に学ぼう。ฅ^•ω•^ฅ ニャ〜
hekuchan
2
670
CSC307 Lecture 05
javiergs
PRO
0
490
Apache Iceberg V3 and migration to V3
tomtanaka
0
120
今から始めるClaude Code超入門
448jp
5
7.1k
TerraformとStrands AgentsでAmazon Bedrock AgentCoreのSSO認証付きエージェントを量産しよう!
neruneruo
4
2.6k
Fluid Templating in TYPO3 14
s2b
0
120
Implementation Patterns
denyspoltorak
0
270
MDN Web Docs に日本語翻訳でコントリビュート
ohmori_yusuke
0
620
2年のAppleウォレットパス開発の振り返り
muno92
PRO
0
190
QAフローを最適化し、品質水準を満たしながらリリースまでの期間を最短化する #RSGT2026
shibayu36
2
4.1k
Featured
See All Featured
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
130
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.8k
Skip the Path - Find Your Career Trail
mkilby
0
51
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
61
49k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
9.5k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
260
Building Flexible Design Systems
yeseniaperezcruz
330
40k
Unsuck your backbone
ammeep
671
58k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
150
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
420
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
Transcript
JLS myths ~ if-then-else statement ~ HASUNUMA Kenji
[email protected]
GlassFish
Users Group Japan
if-else statement if ( someObject.eval() ) if ( otherObject.eval() )
func1(); else func2(); assume that someObject.eval() is false. which is run, func1 or func2?
if-else statement if ( someObject.eval() ) if ( otherObject.eval() )
func1(); else func2(); assume that someObject.eval() is false. Neither func1 nor func2 is run.
if-else statement if ( someObject.eval() ) if ( otherObject.eval() )
func1(); else func2(); It's if-else's short-circuit. Don't be misled by source code format!
From JLS (Java SE 8) IfThenStatement: if ( Expression )
Statement IfThenElseStatement: if ( Expression ) StatementNoShortIf else Statement IfThenElseStatementNoShortIf: if ( Expression ) StatementNoShortIf else StatementNoShortIf
Statement Statement: StatementWithoutTrailingSubstatement LabeledStatement IfThenStatement IfThenElseStatement WhileStatement ForStatement
StatementNoShortIf StatementNoShortIf: StatementWithoutTrailingSubstatement LabeledStatementNoShortIf IfThenElseStatementNoShortIf WhileStatementNoShortIf ForStatementNoShortIf *** 'IfThenStatementNoShortIf' don't
exist ***
if-else statement (fixed) if ( someObject.eval() ) { if (
otherObject.eval() ) func1(); } else func2(); assume that someObject.eval() is false. which is run, func1 or func2?
if-else statement (fixed) if ( someObject.eval() ) { if (
otherObject.eval() ) func1(); } else func2(); func2 is run! because it use block as statement in outer if statement
JLS myths ~ If-then-else statement ~ HASUNUMA Kenji
[email protected]
GlassFish
Users Group Japan