void (String[] args) { // anonymous from class System.out.println(new ArrayList<String>() { @Override public int size() { return super.size(); } }); // anonymous from class System.out.println(new Comparator<String>() { @Override public int compare(String o1, String o2) { return 0; } }); }