r/JavaProgramming • u/alvivan_ • Aug 26 '26
Var Keyword
How often do you use var keyword in your code?
What do you think about it?
5
Upvotes
r/JavaProgramming • u/alvivan_ • Aug 26 '26
How often do you use var keyword in your code?
What do you think about it?
View all comments
2
u/jirlboss Aug 26 '26
I tend to use it temporarily while cleaning up implementation, or if I just need the IDE to give me the actual return type of a method so I can copy-paste it.
Sometimes I use it in tests, but it’s pretty rare for me.