Indeed this will fail to compile because a static modifier cannot be applied to a local variable!
You can’t apply static modifier to a local variable. The compiler doesn’t like that.
Doesn't compile due to illegal use of static modifier in the method fun().
Hah, I thought this is a new java feature to apply static modifier to a local variable
Compile time error, local variable can't be static
static variables are not allowed inside method ..all static variables are class scope and instance variables and methods are specifc to object of that particular class.
Compilation error. Local variables can only be applied "final" modifier.
I'd say a horse riding a man as an answer It's 3am in here :D
Compile time error...it is illegal to declare/initialize local static variable in method
Compilation Error ........ lcl vrbls cn't hv static modifiers.
Compilation Error, you should state which class when calling static method and static variable
static method are declared at class level not in method
How you guys concluded to 0 or 1? its "illegal start of expression"
United States Trends
- 1. #DWTS 75.5K posts
- 2. Robert 116K posts
- 3. Elaine 42.4K posts
- 4. Alix 13.5K posts
- 5. Jordan 115K posts
- 6. Dylan 34.5K posts
- 7. NORMANI 4,089 posts
- 8. Carrie Ann 3,983 posts
- 9. Anthony Black 2,954 posts
- 10. #DancingWithTheStars 1,966 posts
- 11. Drummond 2,881 posts
- 12. #WWENXT 8,268 posts
- 13. Sixers 4,573 posts
- 14. Suggs 2,682 posts
- 15. Collar 30.4K posts
- 16. Godzilla 33.4K posts
- 17. Michigan 85.2K posts
- 18. Jalen Johnson 3,788 posts
- 19. Auburn 9,518 posts
- 20. #iubb 1,326 posts
Something went wrong.
Something went wrong.