An anonymous inner class is an un-named inner class defined implicitly by its instantiation. They are declared and defined using the name of the class or interface they extend.
If the collection fits in the specified array, it is returned therein. Otherwise, a new array is allocated with the runtime type of the specified array and the size of this collection.