Answer: import java.util.Scanner;
public class SortArray {
 public static void main(String[] args) {
 int[] array = getIntegers(5);
 System.out.print("Original array: ");
 printArray(array);
 int[] sortedArray = sortIntegers(array);
 System.out.print("Sorted array: ");
 printArray(sortedArray);
 }
 public static int[] getIntegers(int size) {
 Scanner scanner = new Scanner(System.in);
 int[] array = new int[size];
 System.out.println("Enter " + size + " integers:");
 for (int i = 0; i < size; i++) {
 array[i] = scanner.nextInt();
 }
 return array;
 }
 public static void printArray(int[] array) {
 for (int i = 0; i < array.length; i++) {
 System.out.print(array[i] + " ");
 }
 System.out.println();
 }
 public static int[] sortIntegers(int[] array) {
 int[] sortedArray = new int[array.length];
 for (int i = 0; i < array.length; i++) {
 sortedArray[i] = array[i];
 }
 boolean flag = true;
 int temp;
 while (flag) {
 flag = false;
 for (int i = 0; i < sortedArray.length - 1; i++) {
 if (sortedArray[i] < sortedArray[i + 1]) {
 temp = sortedArray[i];
 sortedArray[i] = sortedArray[i + 1];
 sortedArray[i + 1] = temp;
 flag = true;
 }
 }
 }
 return sortedArray;
 }
}
Explanation: This program peruses 5 integrability from the console, sorts them in plummeting arrange, and prints out the initial and sorted clusters. The getIntegers strategy employments a Scanner protest to examined integrability from the support and store them in an cluster. The printArray strategy basically repeats over the cluster and prints out each component. The sortIntegers strategy makes a modern cluster with the same elements as the input cluster, and after that sorts it employing a basic bubble sort calculation. At last, the most strategy calls the other strategies and prints out the comes about.