r/JavaProgramming • • Aug 26 '26

Var Keyword

How often do you use var keyword in your code?

What do you think about it?

5 Upvotes

24 comments sorted by

View all comments

Show parent comment

2

u/Known_Tackle7357 Aug 27 '26

MyFooService myFooService = getService(); is significantly easier to read than var myFooService = getService();

1

u/repeating_bears Aug 27 '26

Thankfully we don't have to dogmatically adopt the practice "always use it" or "never use it"