Java for:each loop problem doesn't work while for loop works on the same programm.Can anybody tell the difference and tell me why? : 


*Java for:each loop problem doesn't work while for loop works on the same programm.Can anybody tell the difference and tell me why?*

    package pkgtry;
    public class Try{
            public static void main(String args[]) {
                    int array[] = {1,45,57,313,56,1,235,213,352323,547,441,56,2314};
                    System.out.println("Ta stoixeia tou pinaka prin thn taxinomhsh: ");
                    for (int i : array){
                            System.out.print(" " + array[i]);
                    }
                    System.out.println();

                    Try.insertionSort(array);
                    System.out.println("Ta stoixeia tou pinaka meta thn taxinomhsh: ");

                    for (int i : array){
                            System.out.print(" " + array[i]);
                    }
            }

            public static void insertionSort(int array[]){
                    for(int i=1; i<array.length; i++){
                            int current = array[i];
                            int j=i;

                            while(j>0 && array[j -1]> current){
                                    array[j] = array[j-1];
                                    j--;
                            }
                            array[j] = current;
                    }
            }
    }