开发者

Help with a sort method

If i have an array of strings for example

Static final String[] TEST = new String[] { "g","a","b","t","e" };

开发者_如何学运维

How would i go about sorting this in alphabetical order please?


import java.util.Arrays;

Arrays.sort(TEST);


Another example.

static final String[] TEST = "gabte".split("");
static {
   Arrays.sort(TEST);
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜