hello Ramakrishna, not only static methods... but i guess none of the method variables can have static as their modifier.....and only final is allowed and nothing else for a method variable.
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.
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.
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.