# Java 9 Diamond Operator
[ Java 9 New Features](#)
The diamond operator was introduced in Java 7 to make code more readable, but it could not be used with anonymous inner classes.
In Java 9, it can be used with anonymous inner classes, thereby improving code readability.
Consider the following code before Java 9:
## Example
public class Tester{public static void main(String[]args){HandlerintHandler = new Handler(1){ @Override public void handle(){System.out.println(content); }}; intHandler.handle(); HandlerintHandler1 = new Handler(2){ @Override public void handle(){System.out.println(content); }}; intHandler1.handle(); Handlerhandler = new Handler