I am supposed to be writing an array that shifts numbers to the right in BlueJ. For example 1, 2, 3, 4, 5 would be printed as 5, 1, 2, 3, 4. I have searched the Internet and cannot figure out how to begin with this. I did see one post on this site, but the conversation did not make sense to me.
Does anyone know where I can find information about starting to do this? How do you learn what code to use??? So far, below is my pathetic attempt to start:
public class Array_Shift
{
public static void main(String arg[])
{
int num[] = {1, 2, 3, 4, 5};
}
}
Does anyone know where I can find information about starting to do this? How do you learn what code to use??? So far, below is my pathetic attempt to start:
public class Array_Shift
{
public static void main(String arg[])
{
int num[] = {1, 2, 3, 4, 5};
}
}
Comment