R
Roedy Green
Then inside the compare to function do the comparison function.. ??
If so, how would i go about writing a comparison function??
If you have Strings there are two methods for comparing. see
http://mindprod.com/jgloss/gotchas.html#COMPARISON
You might want to trim your strings first.
You Set has a contains method which is a sort of compare.
If you do it the SortedArrayList way with two sorted arrays or
ArrayLists you compare with either equals or equalsIgnoreCase.
or with a Comparator or Comparable. see
http://mindprod.com/jgloss/comparator.html
http://mindprod.com/jgloss/comparable.html
http://mindprod.com/jgloss/sort.html