What will be the output of this Java program? (don't cheat ;) #EclipsePuzzle

EclipseJavaIDE's tweet image. What will be the output of this Java program? (don't cheat ;)
#EclipsePuzzle

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 modifier not allowed in methods.


The result of having fun.


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.


It would be 1 .


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.


Static is not applicable for local variable..


Compilation Error, you should state which class when calling static method and static variable


illegal start of expression, compilation error


static method are declared at class level not in method


Static int will fail to compile.


How you guys concluded to 0 or 1? its "illegal start of expression"


United States Trends
Loading...

Something went wrong.


Something went wrong.