How does the Java compiler handle the following switch block ? What is the scope of the \'b\' variable ?
Note that the \'b\' variable is declared only in the first b
The Scope of variables defined in a switch() statement would be the same as in a normal block wich is surround by { and }.
switch()
{
}
Therefore every variable defined in a switch() statement is visible for the whole block, once it is defined.