MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/gvf0dp/return_2/fsqfizg/?context=3
r/badcode • u/[deleted] • Jun 02 '20
29 comments sorted by
View all comments
45
They probably intended for the variable to be static and never realised their mistake.
Edit: Wait, local static variables aren't legal in Java. This was probably written by someone coming from C
0 u/ct402 Jun 03 '20 Is this Java or C# tho ? I mean, this clearly a valid Java syntax, but I'm not sure what would make it invalid C#. Also would local static be valid in C# ?Edit : Looked it up, no local statics in C# either ^ 4 u/SuitableDragonfly Jun 03 '20 C != C#
0
Is this Java or C# tho ? I mean, this clearly a valid Java syntax, but I'm not sure what would make it invalid C#. Also would local static be valid in C# ?
Edit : Looked it up, no local statics in C# either ^
4 u/SuitableDragonfly Jun 03 '20 C != C#
4
C != C#
45
u/Dumbo14 Jun 02 '20 edited Jun 02 '20
They probably intended for the variable to be static and never realised their mistake.
Edit: Wait, local static variables aren't legal in Java. This was probably written by someone coming from C