So I have this "list" of ints. It could be a Vector
, int[]
, List<Integer>
, whatever.
My goal though is to sort the ints and end up with a String[]
. How the int array starts out as is up in the air.
ex:
Start with:{5,1,2,11,3}
End with: String[] = {"1","2","3","5","11"}
Is there anyway to do this without a for loop? I have a for loop now for collecting the ints. I would rather skip doing another for loop.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…