On 9/12/2004 9:38 AM, Sjoerd van Leent wrote:
SH Solutions wrote:
It is correct behaviour to display a warning, since your first "values" variable can't be used in the nested block. As such it is not an error, and thus can be shut down in eclipse (and javac/jikes/JDT or whatever compiler you are using).Hi
You already had declared another List named "values" just a few lines
above, as shown in the edited version below:
Though it should work, since the second "values" is in another scope.
Regards,
Steffen
From "A Programmer's Guide to Java Certification" (I used it mainly for reference) 1st edition page 114:
"A local variable, already declared in an enclosing block and therefore visible in a nested block, cannot be redeclared in the nested block."
So, eclipse's behavior is correct.
-- Dennis Dai [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
