@@ -0,0 +1,662 @@
+package algorithms.arrayrotation;%0A%0Aimport java.util.Collections;%0Aimport java.util.List;%0Aimport java.util.Scanner;%0Aimport java.util.stream.Collectors;%0Aimport java.util.stream.IntStream;%0A%0Apublic class SolutionWithJavaApi %7B%0A%0A  public static void main(String%5B%5D args) %7B%0A    Scanner scanner = new Scanner(System.in);%0A    int listSize = scanner.nextInt();%0A    int rotations = scanner.nextInt();%0A    scanner.nextLine();%0A    List%3CString%3E integers = IntStream.range(0, listSize).mapToObj(i -%3E String.valueOf(scanner.nextInt())).collect(Collectors.toList());%0A    Collections.rotate(integers, listSize - rotations);%0A    System.out.println(String.join(%22 %22, integers));%0A  %7D%0A%7D%0A

solve the challenge with Java Api