Lets say I have the array:
int[] taco = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
How can I move an element based its index to the front? Example:
Move element taco[5] to the front should produce this:
{0, 1, 2, 3, 4, 5, 6, 7, 8, 9}
// becomes
{5, 0, 1, 2, 3, 4, 6, 7, 8, 9}
EDIT: Does it make a difference if the ints are instead objects?