Advertisement
Guest User

Untitled

a guest
Mar 4th, 2022
33
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2.             int[] tmp = {4,9,3,7};
  3.             int ultimo=tmp[tmp.length -1];
  4.            
  5.             for (int i = tmp.length -1 ; i>0; i--) {
  6.                 int h = i-1;
  7.                 tmp[i] = tmp[h];
  8.            
  9.             }
  10.             tmp[0] = ultimo;
  11.            
  12.             for (int i = 0; i < tmp.length; i++) {
  13.                 System.out.println(tmp[i]);
  14.             }
  15.  
Advertisement
RAW Paste Data Copied
Advertisement