can anyone help me in this program for sorting part and even correct my mistakes if found because i m doing it first time
import java.util.*; import java.util.Scanner; public class project1 { static List<String> input=new ArrayList<String>(); public static void main(String[] args) { Scanner in=new Scanner(System.in); boolean y=true; do { System.out.println("Enter 1 to add a student personal details in list\n2 to edit details\n3 to search"); System.out.println("4 to delete\n5 to sort\n6 to print list\n7 to exit"); System.out.println("enter your choice"); int choice=in.nextInt(); switch(choice) { case 1: insert(); break; case 2: edit(); break; case 3: search(); break; case 4: delete(); break; case 5: sort(); break; case 6: print(); break; case 7: toexit(); break; default: System.out.println("bad input"); break; } System.out.println("want to process more? y/n"); String x=in.next(); char ch=x.charAt(0); if( ch=='n') y=false; } while(y!=false); } static public void insert() { Scanner in=new Scanner(System.in); boolean y=true; do { do{ int i=0; System.out.println("position/index:"+i); { System.out.println("enter student's name"); String name=in.n