class outerClass {
// defining anonymous class
object1 = new Type(parameterList) {
// body of the anonymous class
};
}
//for Java 10
boolean result = true;
var objResult = new Object() {
boolean success = result;
};
System.out.println(objResult.success);
new Student().display();