Describe me below code how this program code is make and work, and those method is use in this why?
public static void main(Stringargs)
Scanner input=new Scanner(System.in);
System.out.println("Enter the Elements:");
ArrayList<String> List=new ArrayList<String>();
System.out.println("ArrayList Elements in Sorted order:");
the purpose of education is to replace an empty mind with an open
input the purpose of education is to replace an empty mind with an open output. one of education is an empty an open
Scanner class allow the user to read input from command prompt. To store the data, an object of ArrayList is created, that will add the list elements using add() method. The method read() reads the string value from the console.We have used for loop to input 5 elements. Now to sort these elements, we have used Collections.sort() method that will sort the list elements alphabetically.