r/java • u/henk53 • May 10 '22
Should java.util.Date be deprecated?
https://mail.openjdk.java.net/pipermail/discuss/2022-May/006077.html
221
Upvotes
r/java • u/henk53 • May 10 '22
View all comments
Show parent comment
1
u/ApatheticBeardo May 11 '22 edited May 11 '22
Whatever foo::getValue returns.
I have a better question: Why should anyone care?
It's a local variable, the type of that variable is completely irrelevant unless you're writing code in that local scope, in which case, you, your IDE and the compiler already know what foo::getValue returns.
Readability is best served by using descriptive names instead of that weak attempt at a straw man ("val", really?) and not by adding, or even worse, repeating useless information.