Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
JLS myths ~ if-then-else statement ~
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
HASUNUMA Kenji
October 01, 2016
Programming
80
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
JLS myths ~ if-then-else statement ~
HASUNUMA Kenji
October 01, 2016
More Decks by HASUNUMA Kenji
See All by HASUNUMA Kenji
Jakarta EE: The First Parts
khasunuma
0
76
Life of our small product
khasunuma
0
54
How to adapt MicroProfile API for generic Web applications
khasunuma
0
57
Overviewing Admin Console
khasunuma
0
52
Introduction to MicroProfile Metrics
khasunuma
0
84
Basic method for Java EE Web Profile
khasunuma
0
55
Introduction to JCA and MDB
khasunuma
0
110
Collections Framework Begineers Guide 2
khasunuma
0
120
Introduction to Date and Time API 4
khasunuma
0
110
Other Decks in Programming
See All in Programming
Domain-Driven Transformation
hschwentner
2
2.3k
作れる、でも消せるか?──安全に「枯らして消す」機能削除術 / Drain, Then Delete
chobishiba
2
1k
APNsからLive Activityを開始する話
yumnumm
0
180
Agentic Software Factoryに、すごく賢いIF文を。 / super smart IF statement into the Agentic Software Factory.
rkaga
8
2.4k
クラウドエージェントは、 何がそんなに便利なのか / what makes cloud agents so useful
rkaga
3
560
R8 の設定見直しでアプリサイズ削減
andpad
0
230
Compiling a real-world CLI tool to native with Static Hermes
tmikov2023
0
130
学びを記事・スライド・Xへ高速展開する― AI-assisted Learning Loopで回すコンテンツ生成術
ochtum
0
150
パスワード再設定メールのURLについて知っておこう
uyuki234
0
190
Apple Intelligenceとオンデバイス時代の到来
yahir0
0
140
Web Framework Benchmark Battle 2026, Any%
a_matsuda
3
3k
Python Lambdaにおけるテストしやすい設計とAI支援の活用 / Designing Testable Python Lambda Functions with AI
kitano_yuichi
1
200
Featured
See All Featured
We Are The Robots
honzajavorek
0
410
Bash Introduction
62gerente
615
220k
Typedesign – Prime Four
hannesfritz
42
3.2k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
540
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.4k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
640
Paper Plane (Part 1)
katiecoart
PRO
2
12k
YesSQL, Process and Tooling at Scale
rocio
174
15k
The SEO identity crisis: Don't let AI make you average
varn
0
610
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
120
120k
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
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