First of all, I'm assuming you're using Java 1.5, with all the autoboxing. Correct?
Anyway, to the point. Your List is a List with Integer objects. You add ints, but Java internally creates Integer objects for you. f on the other hand is a String. There is no > defined for String, only compareTo. That won't work with Integer and String though.
You should either make an int / Integer from f and then keep using >, or store Strings in the List instead and use compareTo(). Keep in mind that this will use lexicographical comparison: 10 < 2 for instance.
Any List, including ArrayList, stores Objects (in Java 1.5 you can set which type of Object), not only Strings. You want to store ints, so the Integer wrapper class would fit best: This code can have duplicate values.
If you don't want duplicate values you should use a SortedSet like TreeSet. This already keeps Integers in order so you just add an Integer without all the looking up of the index. Then use java.util.Iterator to iterate over the elements.
subject: > cannot be applied to int,Java,Lang.Object??!!