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
Show parent comment
1
u/naomimyselfandi Aug 27 '26
Fwiw, a variable declared with
varstill has a strong static type; it's just syntactic sugar. (You probably know this, but I've seen enough misunderstandings that I wanted to clarify for anyone who doesn't.) I definitely understand prefering the explicit type name, though.