I don't need to sort. I need to know how to move first item in the list to the bottom of the list.
String inputString = "alpha|beta|gamma|delta";
String tokens[] = inputString.split("\\|");
int numTokens = tokens.length;
for (int i = 0; i < numTokens; i++) {
System.out.println("[" + i + "] " + tokens[i]);
}
Output from syst out print:
[0] alpha
[1] beta
[2] gamma
[3] delta
I would like to know how to take the result of Output and move the first to always be at the bottom of the list?
[0] beta
[1] gamma
[2] delta
[3] alpha
I know that tokens[0] will always be the same value for this example it will always be "alpha", it will always be in the first position in the string inputString, but I don't know how to move it to bottom of list if possible.
Any suggestion appreciated Thank you very much.