static var i in main is not shadowing the class level variable i declared. static modifier for variables cannot be used insie methods, its a compile time error.
SCJP 1.4 96%, SCBCD 1.3 94%
Joined: Aug 02, 2005
Joined: Sep 18, 2004
Originally posted by shashikanth penumadula: hi a local variable can have only a variable type and identifier. it cannot have keywords like public , private, protected, final, static , transient or volatile.
variables can have final as modifier in local scope.
/** Code speaks louder than words */
Joined: Aug 25, 2005
err... u cant have local static varaibles. thats it
MCSD, SCJP, SCWCD, SCBCD, SCJD (in progress - URLybird 1.2.1)