Fun with `var` in Java 11


Details
This is a virtual Meetup occuring at 5PM UK time (BST), here's a timezone calculator (https://www.timeanddate.com/worldclock/fixedtime.html?msg=Fun+with+%60var%60+in+Java+11&iso=20181212T17&p1=136&ah=1).
You can tune in to the live session at virtualJUG.com (http://virtualJUG.com/)
Join us for live, in-session discussion on our slack space: https://goo.gl/ELDDcp
Abstract:
"Since Java 10 you can use `var` to let the compiler infer a local variable's type:
var users = new ArrayList()
And that's pretty much it, right? Surprisingly, no! There are a lot of details to consider...
- is this JavaScript?!
- how exactly is the type inferred?
- where can I use `var` and what should I look out for?
- won't this lead to unreadable code?
... and a few fun things to do with `var`...
- playing with anonymous classes (don't!)
- faking traits (don't!)
- faking intersection types (do!)
After this live-coding deep dive into `var`, you'll know all about Java 10's flagship feature."
Speaker: Nicolai Parlog
"Nicolai is a thirty year old boy, as the narrator would put it (if he
squints), who has found his passion in software development. He
constantly reads, thinks, and writes about it, and codes for a living
as well as for fun.
Nicolai is a freelancing developer, author, and trainer. He wrote The
Java Module System with Manning, blogs about software development
on [codefx.org]2, has a YouTube channel, and is a long-tail
contributor to several open source projects. You can hire him for
all kinds of things.

Fun with `var` in Java 11