Stage 7 #2 The Dangling Else Problem

Опубликовано: 11 Июль 2026
на канале: Merlin Wellington
1,051
12

Sometimes when you nest conditionals, it's there seem to be options for which IF statement an ELSE statement belongs to. In this video, we'll explore those situations and the rule that the compiler uses to pair ELSE statements with IF statements. Along the way, we'll talk about what makes some conditional statements prettier than others.

This video is part of a series that accompanies the book, "A Developer's Approach to Java." Designed to teach good software engineering practices like test-driven development from the beginning, this is a unique, hands-on way to learn Java programming.

Email me at [email protected]