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 Engineering Summit Tokyo 2025] LLMは計画業務のゲームチェンジャーか? 最適化業務における活⽤の可能性と限界
terryu16
2
600
Basic Architectures
denyspoltorak
0
650
16年目のピクシブ百科事典を支える最新の技術基盤 / The Modern Tech Stack Powering Pixiv Encyclopedia in its 16th Year
ahuglajbclajep
5
950
ThorVG Viewer In VS Code
nors
0
750
AgentCoreとHuman in the Loop
har1101
5
200
フロントエンド開発の勘所 -複数事業を経験して見えた判断軸の違い-
heimusu
7
2.7k
0→1 フロントエンド開発 Tips🚀 #レバテックMeetup
bengo4com
0
530
AIフル活用時代だからこそ学んでおきたい働き方の心得
shinoyu
0
120
AI Agent Tool のためのバックエンドアーキテクチャを考える #encraft
izumin5210
6
1.7k
フルサイクルエンジニアリングをAI Agentで全自動化したい 〜構想と現在地〜
kamina_zzz
0
390
Vibe Coding - AI 驅動的軟體開發
mickyp100
0
160
OSSとなったswift-buildで Xcodeのビルドを差し替えられるため 自分でXcodeを直せる時代になっている ダイアモンド問題編
yimajo
3
580
Featured
See All Featured
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
810
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
1
1.4k
エンジニアに許された特別な時間の終わり
watany
106
230k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
900
Prompt Engineering for Job Search
mfonobong
0
150
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
160
A Tale of Four Properties
chriscoyier
162
24k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.8k
Getting science done with accelerated Python computing platforms
jacobtomlinson
1
110
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.2k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Deep Space Network (abreviated)
tonyrice
0
37
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