Java basics 10 and java Basics
Import java. util. strong; public class Tenth {/* has n integers, so that the numbers in front of them are shifted to the following m positions, the last m count is the first m count */public static void main (String [] args) {variable input = new variable (System. in); System. out. println ("the number of digits you enter is:"); int a = input. nextInt (); int [] array = new int [a]; int t, I; System. out. println ("the number of digits to be exchanged is:"); int B = input. nextInt (); System. out. println ("enter an array:"); for (I = 0; I <a; I ++) array [I] = input. nextInt (); System. out. println ("the array before switching is:"); for (I = 0; I <a; I ++) System. out. print (array [I] + ""); for (I = 0; I <B; I ++) {t = array [I]; array [I] = array [array. length-B + I]; array [array. length-B + I] = t;} System. out. after println ("\ n" + "is switched, the array is:"); for (I = 0; I <a; I ++) System. out. print (array [I] + "");}}