How to sort an arraylist of objects java?

后端 未结 6 1067
失恋的感觉
失恋的感觉 2020-12-10 16:26

So I want an arraylist of objects in java.

I have object1.number and object2.number, object3.number, etc... but those objects

6条回答
  •  独厮守ぢ
    2020-12-10 17:11

    To manipulate the entries of an ArrayList like that of a traditional array, use ArrayList.set(int, E).

    http://docs.oracle.com/javase/1.5.0/docs/api/java/util/ArrayList.html#set%28int,%20E%29

提交回复
热议问题