• + 1 comment

    What is the meaning/difference between this syntax the the following syntax provided by some people:

    class Checker { public Comparator desc = new Comparator() { public int compare(Player obj1, Player obj2) { // compare } }; }

    OR even

    public Comparator desc = null; public Checker() { desc = new Comparator() { public int compare(Player p1, Player p2) { //compare } }; }