Making Java Objects Comparable
Subject:   Not anonymous classes :-)
Date:   2003-03-14 05:49:40
From:   fabiolourencetti
Response to: Not anonymous classes :-)

The article is right.

FirstNameComparator and LastNameComparator are static attributes. Anonymous class is:

new Comparator() {...}

Brazil/Sao Paulo

Full Threads Oldest First

Showing messages 1 through 1 of 1.

  • Not anonymous classes :-)
    2003-03-18 01:54:56  jczeus [View]

    Being even more pedantic:
    Following the java naming conventions, these two (static) members should start with a lowercase. Perhaps this is what produced some confusion: these are no classnames!
    The proof that these classes are anonymous: compilation of the Person class also produces the two files: Person$1.class and Person$2.class.