
write a java program that will read a sequence of 10 positive real nos. entered by the user and will print the same numbers in sorted order from lowest to highest using arrays .
PLEASE NEED HELP ,STUCK WITH THIS :(

import java.util.*;
class ArraySort{
public static void main(String[] args)
{
Scanner input=new Scanner(System.in);
System.out.println("Enter positive real numbers: ");
Integer array[]=new Integer[10];
for(int i=0;i<array.length;i++){
array[i]=input.nextInt();
}
System.out.println("Sorted Array in reverse order:");
Arrays.sort(array,Collections.reverseOrder());
for(int i=0;i<array.length;i++){
System.out.println(array[i]);
}
}
}
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.