case '1': String[] tempNames=new String [30]; System.out.println("Please enter filename:"); fileName= input.next(); custTemp=custData.readFile(fileName); for(int i=0; i<custTemp.length;i++) { if(custTemp[i].get_name()!=null) { tempNames[i]=custTemp[i].get_name(); custTxt.add(custTemp[i]); } } Arrays.sort(tempNames); System.out.println("Here"); break;
after the codes execute the for loop it immediately jump to the break without executing the println statement and the Arrays.sort()