Using var you can now use anonymous classes as a replacement of named classes. This is convenient if you want to encapsulate interactions with instances of this class and data attached to them inside a method. #java #java10 #middle #senior https://dzone.com/articles/how-java-10-changes-the-way-we-use-anonymous-inner