Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In which version of Java were anonymous classes introduced?

The purpose of anonymous classes is clear and understandable. But I'm unable to find the minimum version of Java which supports anonymous classes. Can anyone tell me the exact Java version which supports it?

like image 783
Udhaya Kumar K Avatar asked Jul 27 '16 07:07

Udhaya Kumar K


1 Answers

Java 1.1

Source: https://www.cs.cornell.edu/andru/javaspec/1.1Update.html

Details: Added along with inner classes. Anonymous classes are a type of Inner Class (https://en.wikipedia.org/wiki/Inner_class). Inner classes were introduced in Java 1.1 (https://en.wikipedia.org/wiki/Java_version_history).

like image 115
Curtis Yallop Avatar answered Sep 20 '22 16:09

Curtis Yallop