Now I am working diligently on my program in JAVA and its driving me crazy! I'm about to just give up! The project is due midnight tonight. So i'll be working on it until minutes to 12. This is the program I'm stuck on:
public class ARotate
{
public static void main(String args[])
{
swap();
print();
}
public static int[] swap()
{
int rotate=2;
int array[]={7,3,6,2};
int temp=array[3];
for(int i=0;i
for(i=array.length;i>0;i--)
{
array[i]=array[i-1];
}
array[0]=temp;
return array;
}
public static void print ()
{
int array[]={7,3,6,2};
for(int i=0;i
System.out.println(array[i]);
}
}
}

No comments:
Post a Comment