Stuart Marks, Consulting Member of Technical Staff, Oracle
Java 10 introduced a feature called local variable type inference, which enables programmers to declare local variables by using “var” instead of an explicit type. This feature makes it possible to write code that is more concise and more readable. However, it’s also possible for this feature to be misused, obfuscating code instead of making it more readable. The Java team has published a set of style guidelines that help direct programmers toward uses of var that improve code quality and help them avoid uses that detract from code quality. This session presents an overview of the new var feature and describes these style rules. The presentation is liberally supplemented with code examples of good uses as well as misuses of var.
Watch video Var with Style: Local Variable Type Inference in Java online without registration, duration hours minute second in high quality. This video was added by user Oracle Developers 24 October 2018, don't forget to share it with your friends and acquaintances, it has been viewed on our site 2,007 once and liked it 31 people.