Since Java doesnt support pointers, How is it possible to call a function by reference in Java like we do in C and C++??
Usually in java this is solved by using interfaces:
Collections.sort(list, new Comparator() { @Override public int compareTo(Object o1, Object o2) { /// code } });