55
You can finally declare local variables in Java with var — here’s why that’s awesome

You can finally declare local variables in Java with var — here’s why that’s awesome

5 years ago
Anonymous $oIHRkISgaL

https://medium.freecodecamp.org/you-can-finally-declare-local-variables-in-java-with-var-heres-why-that-s-awesome-4418cb7e2da3

Hello everyone! In this article, I’ll discuss new features of Java 10. Specifically, I am going to talk about probably the most popular and most useful: the introduction of the var keyword in Java. Well, it’s not really a keyword — but I’ll tell you about it later.

Finally, Java has gotten the var keyword to declare local variables. This allows you to declare a variable without its type. For example, instead of doing this: