This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
In general, code that can't possibly execute causes a compile-time error in Java. That's what you're seeing in your "while" example.
However, "if (false)" is a special case. Java allows this, even though the code inside the "if" cannot ever run. See this part of the Java Language Specification and search for "unreachable" for why. [ August 16, 2007: Message edited by: Peter Chase ]
Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.
any variable that you to declare inside of a method is local, then before uses-there must inicializar with a value. The code does not compel, why it is not insurance that instruction if or while executes, and you after this instruction it used a local variable that does not have value. It is not guaranteed that x = 3.0f.