So I want an arraylist of objects in java.
I have object1.number
and object2.number
, object3.number
, etc... but those objects have other properties besides number
, such as name
, distance
, etc...
So if it was sorting a string in a array
it would just be, put a string in a temporal
and let the other string take its place... but in an araryList
of objects, how can I do it?
Can I just move objects to that position of the array?
Thanks.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…