I\'m looking to move things around within an Array.
I want to be able to move the last item within the given Array to a spot while moving those in the current locati
First of all, in your code you do
for (int x = stuff.length-1; x > pos; x--)
where pos is not even defined, I suggest on changing it to position. second of all, change the "list" to "stuff".
Modified, working code:
public static void moveLastup(String[] stuff, int position)
{
String y = stuff[stuff.length-1];
for (int x = stuff.length-1; x > position; x--)
stuff[x] = stuff[x-1];
stuff[position] = y;
}