criyle/codenet-compile-errors huggingface dataset:
Language: Java

import java.util.*;

public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
        String[] str = new String[2];
        int count = 0;
        while(in.hasNext()) {
            String buf = in.nextLine();
            str[count] = buf;
            count++;
        }
        Integer number = Integer.parseInt(str[0]);
        String[] split = str[1].split(" ");
        int[] facter; 
        facter = new int[split.length];
        
        for (int i = 0; i < split.length; i++) {
        	if (t != 0) {
        		System.out.print(" ");
        	}
        	facter[i] = Integer.parseInt(split[i]);
        	System.out.print(facter[i]);
        }
        System.out.println("");

        
        for (int i = 1; i <= (number -1); i++) {
        	int v = facter[i];
        	int j = i - 1;
        	
        	while ((j >= 0) && (facter[j] > v)) {
        		facter[j + 1] = facter[j];
        		j--;
        	}
        	facter[j + 1] = v;
        	
        	for ( int t = 0; t < split.length; t++) {
        		if (t != 0) {
        			System.out.print(" ");
        		}
        		System.out.print(facter[t]);
        	}
        	System.out.println("");

        	
        }
	}

}

Compiler output:
Main.java:20: error: cannot find symbol
        	if (t != 0) {
        	    ^
  symbol:   variable t
  location: class Main
1 error
Language: Java

import java.io.File;
import java.io.FileNotFoundException;
import java.io.InputStreamReader;
import java.util.*;

public class Main {
    public static void main(String[] args){
        // write your code here
        try{
            Scanner scan = new Scanner(System.in);
            int index = scan.nextInt();
            int[] arr = new int[index];
            for(int i = 0; i<index;i++){
                arr[i] = scan.nextInt();
            }

            for(int i = 0; i<index;i++){
                int key = arr[i];
                int j = i-1;
                while(j>=0 && arr[j]>key){
                    arr[j+1] = arr[j];
                    j--;
                }
                arr[j+1] = key;
                for(int k = 0; k<index;k++){
                    System.out.print(arr[k]);
                    if(k!=index-1)System.out.print(" ");
                }
                System.out.print("\n");
            }
        }catch (FileNotFoundException e){
            System.out.println(e);
        }
    }
}

Compiler output:
Main.java:31: error: exception FileNotFoundException is never thrown in body of corresponding try statement
        }catch (FileNotFoundException e){
         ^
1 error
Language: Java



import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;

public class MyInsertion {

    private static int[] sort(int[] arr) {
        for (int i = 1; i < arr.length; i++) {
            System.out.println(Arrays.toString(arr));
            int key = arr[i];
            int j = i - 1;
            while (j >= 0 && arr[j] > key) {
                arr[j + 1] = arr[j];
                j--;
                arr[j + 1] = key;
            }
        }
        System.out.println(Arrays.toString(arr));
        return arr;
    }

    public static void main(String[] args) throws IOException {
        BufferedReader reader = new BufferedReader(
                new InputStreamReader(System.in));
        int size = Integer.parseInt(reader.readLine());
        String[] str = reader.readLine().trim().split(" ");
        int[] arr = new int[size];
        for (int i = 0; i < arr.length; i++) {
            arr[i] = Integer.parseInt(str[i]);
        }
        reader.close();
        sort(arr);
    }
}

Compiler output:
Main.java:8: error: class MyInsertion is public, should be declared in a file named MyInsertion.java
public class MyInsertion {
       ^
1 error
Language: Java

package topic01;

import java.util.Scanner;

public class InsertionSort {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int[] array;
		
		int n = sc.nextInt();
		array = new int[n];
		for (int i = 0; i < n; i++)
			array[i] = sc.nextInt();
		
		doInsertionSort(array);
		
		printArray(array);
	}
	public static void doInsertionSort(int[] array) {
		for (int i = 1; i < array.length; i++) {
			int val = array[i];
			int j = i - 1;
			
			printArray(array);

			while (j >= 0 && array[j] > val) {
				array[j + 1] = array[j];
				j--;
			}
			array[j + 1] = val;
		}
	}
	public static void printArray(int[] array) {
		for (int i = 0; i < array.length; i++) {
			if (i != 0) 
				System.out.print(" ");
			System.out.print(array[i]);
		}
		System.out.print("\n");
	}
}

Compiler output:
Main.java:5: error: class InsertionSort is public, should be declared in a file named InsertionSort.java
public class InsertionSort {
       ^
1 error
Language: Java

import java.util.Scanner;

public class InsertionSort {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		int[] array = new int[n];
		for (int i = 0; i < n; i++)
			array[i] = sc.nextInt();

		doInsertionSort(array);

		printArray(array);
	}
	public static void doInsertionSort(int []array) {
		for (int i = 1; i < array.length; i++) {
			int val = array[i];
			int j = i - 1;
			while (j >= 0 && array[j] > val) {
				array[j + 1] = array[j];
				j--;
			}
			array[j + 1] = val;
		}
	}
	public static void printArray(int []array) {
		for (int i = 0; i < array.length; i++) {
			if (i != 0)
				System.out.print(" ");
			System.out.print(array[i]);
		}
		System.out.print("\n");
	}
}

Compiler output:
Main.java:3: error: class InsertionSort is public, should be declared in a file named InsertionSort.java
public class InsertionSort {
       ^
1 error
Language: Java

public class Main{
	public static void main(String[] args){
		ArrayList<Integer> A = new ArrayList<Integer>();
		Scanner scanner = new Scanner(System.in);
		int N = scanner.nextInt();

		for(int i=0;i<N;i++){
			A.add(scanner.nextInt());
		}
//		while(scanner.hasNext()){
//			A.add(scanner.nextInt());
//		}
		insertionSort(A,N);
	}
	static void insertionSort(ArrayList<Integer> A,int N){
		for(int i=1;i<N;i++){
			int v = A.get(i);
			int j=i-1;
			while(j>=0 && (v < A.get(j))){
				A.set(j+1,A.get(j));
				j--;
			}
			//??????????±????i????????????v??????j??????????????\??????????????????????????\?????????
			A.set(j+1, v);
			System.out.println(A);

		}
	}	
}

Compiler output:
Main.java:15: error: cannot find symbol
	static void insertionSort(ArrayList<Integer> A,int N){
	                          ^
  symbol:   class ArrayList
  location: class Main
Main.java:3: error: cannot find symbol
		ArrayList<Integer> A = new ArrayList<Integer>();
		^
  symbol:   class ArrayList
  location: class Main
Main.java:3: error: cannot find symbol
		ArrayList<Integer> A = new ArrayList<Integer>();
		                           ^
  symbol:   class ArrayList
  location: class Main
Main.java:4: error: cannot find symbol
		Scanner scanner = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:4: error: cannot find symbol
		Scanner scanner = new Scanner(System.in);
		                      ^
  symbol:   class Scanner
  location: class Main
5 errors
Language: Java

import java.io.IOException;
import java.io.InputStreamReader;
 
public class Main{
 
    public static void main(String[] args) throws NumberFormatException, IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int N = Integer.parseInt(br.readLine());
        int [] A = new int[N];
        String [] str = br.readLine().split(" ");
        for(int i = 0;i < str.length;i++){
            A[i] = Integer.parseInt(str[i]);
        }
        insertionSort(A,N);
    }
 
    public static void insertionSort(int[] A,int N){
        show(A);
        for(int i=1; i<N;i++){
            int v = A[i];
            int j = i-1;
            while(j>=0 && A[j] > v){
                A[j+1] = A[j];
                j--;
            }
            A[j+1] = v;
            show(A);
        }
    }
 
    public static void show(int []A){
        StringBuilder sb = new StringBuilder();
        for(int i = 0;i < A.length;i++){
            sb.append(A[i]);
            if(i != A.length-1) sb.append(" ");
        }
        System.out.println(sb.toString());
    }
 
}


 

Compiler output:
Main.java:7: error: cannot find symbol
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        ^
  symbol:   class BufferedReader
  location: class Main
Main.java:7: error: cannot find symbol
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
                                ^
  symbol:   class BufferedReader
  location: class Main
2 errors
Language: Java

void insertSort(int a[], int n){
		for(int i = 1 ; i < n - 1; i++){
			int v = a[i];
			int j = i - 1;
			while(j > 0 && a[i] > v){
				a[i + 1] = a[i];
				j--;
			}
			a[j + 1] = v;
		}
	}

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
void insertSort(int a[], int n){
^
  (use --enable-preview to enable unnamed classes)
1 error
Language: Java

class Main {
static void insert(int a[],int i,int x){
		int b[] = new int[a.length + 1];
		for(int l = 0;l < a.length;l++)
			b[l] = a[l];
		while(i > 0 && b[i-1] > x){
			b[i] = b[i-1];
			i--;
			}
		b[i] = x;
		System.out.println(Arrays.toString(b));
	}
	public static void main(String[] args){
		int a[] = {4,3,3,9,5};
		for(int i = 0; i < a.length; i++)
		insert(a,i,a[i+1]);
	}
}

Compiler output:
Main.java:11: error: cannot find symbol
		System.out.println(Arrays.toString(b));
		                   ^
  symbol:   variable Arrays
  location: class Main
1 error
Language: Java

public class practice {
static void insertSort(int a[], int n){
for(int i = 1 ; i < n - 1; i++){
int v = a[i];
int j = i - 1;
while(j > 0 && a[i] > v){
a[i + 1] = a[i];
j--;
}
a[j + 1] = v;
}
}
}

Compiler output:
Main.java:1: error: class practice is public, should be declared in a file named practice.java
public class practice {
       ^
1 error
Language: Java

public class Main {
	
	static void insertSort(int a[], int n){
		for(int i = 1 ; i < n; i++){
			int v = a[i];
			int j = i - 1;
			while(j >= 0 && a[i] > v){
				a[i + 1] = a[i];
				j--;
			}
			a[j + 1] = v;
		}
	}

	public static void main(String args[]) throws IOException{
		int N,i;
		int A[] = new int[100];
		
		N = System.in.read();
		for(i = 0; i < A.length; i++){
			A[i] = System.in.read();
			if(A[i] == -1)break;
		}
		
		insertSort(A,N);
		
	}
}

Compiler output:
Main.java:15: error: cannot find symbol
	public static void main(String args[]) throws IOException{
	                                              ^
  symbol:   class IOException
  location: class Main
1 error
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class KakkiAlg11A{
	public static void main(String[] args) throws IOException {
	  BufferedReader br = new BufferedReader(new InputStreamReader(System.in), 1);
	  String str = br.readLine();
	  int len = Integer.parseInt(str); 
	  str = br.readLine();
	  String[] splitStr = str.split(" ");
	  
	  int target[] = new int[len];
	  
	  for(int i = 0;i<len;i++){
	   target[i] = Integer.parseInt(splitStr[i]);
	  }

      //???????????\???????????????
	  StringBuffer sb_0 = new StringBuffer();
	  for(int v = 0; v < len;v++){
	    sb_0.append(target[v]);
	    if(v != len-1){
	      sb_0.append(" ");
	    //}else {
	      //sb_0.append("\n");
	    }
          }
          System.out.println(sb_0);
      //???????????§??????????????????

	  for(int i = 1;i<len;i++){
	    int cash = target[i];
	    int num = i-1;
	    while(num>= 0 && target[num] > cash){
	      target[num+1] = target[num];
	      num--;
	      target[num+1] = cash;
	    }
            
            StringBuffer sb = new StringBuffer();
	    for(int v = 0; v < len;v++){
	      sb.append(target[v]);
	      if(v != len-1){
	        sb.append(" ");
	      //}else {
	        //sb.append("\n");
	      }
            }
            System.out.println(sb);
	  }
	}
}

Compiler output:
Main.java:5: error: class KakkiAlg11A is public, should be declared in a file named KakkiAlg11A.java
public class KakkiAlg11A{
       ^
1 error
Language: Java

import java.util.Scanner;
import java.lang.Integer;
import java.lang.StringBuilder;
import java.lang.Math;

public class Main {
  private static int N;
  private static int[] a;

  private static void print() {
    StringBuilder result = new StringBuilder();
    for (int i = 0; i < N; i++) {
      result.append(a[i]);
      result.append(" ");
    }
    System.out.println(result.toString().trim());
  }

  private static void sort() {
    if (a.length == 1) {
      print();
      return;
    }
    int min = 0;

    for (int i = 1; i < N; i++) {
      print();
      int v = a[i];
      int j = i - 1;
      while (j >= 0 && v < a[j]) {
        // right shift
        a[j + 1] = a[j];
        j--;
      }
      a[j + 1] = v;
    }
    print();
  }

  public static void main(String[] args) {
    Scanner in = new Scanner(System.in);
    N = in.nextInt();
    a = new int[N];
    for (int i = 0; i < N; i++) {
      a[i] = in.nextInt();
    }

    // sort a.
    sort();
    // a is now sorted.


  }
}
oz

Compiler output:
Main.java:55: error: reached end of file while parsing
oz
^
1 error
Language: Java

import java.util.Scanner;
public class Sort {

	public static void main(String[] args) {
		int i,j,k,v;
		Scanner in = new Scanner(System.in);
		int n = Integer.parseInt(in.nextLine());
		int array[] = new int[n];

		for(i=0;i<n;i++)array[i] = Integer.parseInt(in.next());

	for(i=0;i<n;i++){
		v = array[i];
		j = i-1;
		while(j>=0 && array[j]>v){
			array[j+1] = array[j];
			j--;
		array[j+1] = v;
		}
	    for(k = 0;k<n-1;k++)System.out.print(array[k]+"");
	    if(i<(n-1))System.out.println(array[k]);
	    else System.out.print(array[k]);
	}
	}

}

Compiler output:
Main.java:2: error: class Sort is public, should be declared in a file named Sort.java
public class Sort {
       ^
1 error
Language: Java

import java.util.Scanner;
public class Insertion_sort {

	public static void main(String[] args) {
		int i,j,k,v;
		Scanner in = new Scanner(System.in);
		int n = Integer.parseInt(in.nextLine());
		int array[] = new int[n];

		for(i=0;i<n;i++)array[i] = Integer.parseInt(in.next());

	for(i=0;i<n;i++){
		v = array[i];
		j = i-1;
		while(j>=0 && array[j]>v){
			array[j+1] = array[j];
			j--;
		array[j+1] = v;
		}
	    for(k = 0;k<n-1;k++)System.out.print(array[k]+"");
	    if(i<(n-1))System.out.println(array[k]);
	    else System.out.print(array[k]);
	}
	}

}

Compiler output:
Main.java:2: error: class Insertion_sort is public, should be declared in a file named Insertion_sort.java
public class Insertion_sort {
       ^
1 error
Language: Java

import java.util.Scanner;
public class Insertion_Sort {

	public static void main(String[] args) {
		int i,j,k,v;
		Scanner in = new Scanner(System.in);
		int n = Integer.parseInt(in.nextLine());
		int array[] = new int[n];

		for(i=0;i<n;i++)array[i] = Integer.parseInt(in.next());

	for(i=0;i<n;i++){
		v = array[i];
		j = i-1;
		while(j>=0 && array[j]>v){
			array[j+1] = array[j];
			j--;
		array[j+1] = v;
		}
	    for(k = 0;k<n-1;k++)System.out.print(array[k]+"");
	    if(i<(n-1))System.out.println(array[k]);
	    else System.out.print(array[k]);
	}
	}

}

Compiler output:
Main.java:2: error: class Insertion_Sort is public, should be declared in a file named Insertion_Sort.java
public class Insertion_Sort {
       ^
1 error
Language: Java

import java.util.Scanner;
class Insertion_sort {

	public static void main(String[] args)  throws IOException  {
		int i,j,k,v;
		Scanner in = new Scanner(System.in);
		int n = Integer.parseInt(in.nextLine());
		int array[] = new int[n];

		for(i=0;i<n;i++)array[i] = Integer.parseInt(in.next());

	for(i=0;i<n;i++){
		v = array[i];
		j = i-1;
		while(j>=0 && array[j]>v){
			array[j+1] = array[j];
			j--;
		array[j+1] = v;
		}
	    for(k = 0;k<n-1;k++)System.out.print(array[k]+" ");
	    if(i<(n-1))System.out.println(array[k]);
	    else System.out.print(array[k]);
	}
	}
}

Compiler output:
Main.java:4: error: cannot find symbol
	public static void main(String[] args)  throws IOException  {
	                                               ^
  symbol:   class IOException
  location: class Insertion_sort
1 error
Language: Java

import java.util.Scanner;
class Main {

	public static void main(String[] args)  throws IOException  {
		int i,j,k,v;
		Scanner in = new Scanner(System.in);
		int n = Integer.parseInt(in.nextLine());
		int array[] = new int[n];

		for(i=0;i<n;i++)array[i] = Integer.parseInt(in.next());

	for(i=0;i<n;i++){
		v = array[i];
		j = i-1;
		while(j>=0 && array[j]>v){
			array[j+1] = array[j];
			j--;
		array[j+1] = v;
		}
	    for(k = 0;k<n-1;k++)System.out.print(array[k]+" ");
	    if(i<(n-1))System.out.println(array[k]);
	    else System.out.print(array[k]);
	}
	}
}

Compiler output:
Main.java:4: error: cannot find symbol
	public static void main(String[] args)  throws IOException  {
	                                               ^
  symbol:   class IOException
  location: class Main
1 error
Language: Java

import java.util.Scanner;
class Main {

	public static void main(String[] args)  throws IOException  {
		int i,j,k,v;
		Scanner in = new Scanner(System.in);
		int n = Integer.parseInt(in.nextLine());
		int array[] = new int[n];

		for(i=0;i<n;i++)array[i] = Integer.parseInt(in.next());

	for(i=0;i<n;i++){
		v = array[i];
		j = i-1;
		while(j>=0 && array[j]>v){
			array[j+1] = array[j];
			j--;
		array[j+1] = v;
		}
	    for(k = 0;k<n-1;k++)System.out.print(array[k]+" ");
	    if(i<(n-1))System.out.println(array[k]);
	    else System.out.println(array[k]);
	}
	}
}

Compiler output:
Main.java:4: error: cannot find symbol
	public static void main(String[] args)  throws IOException  {
	                                               ^
  symbol:   class IOException
  location: class Main
1 error
Language: Java

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		int i,j,k,v;
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int array[] = new int[n];

		for(i=0;i<n;i++)array[i] = in.nextInt();

	for(i=0;i<n;i++){
		v = array[i];
		j = i-1;
		while(j>=0 && array[j]>v){
			array[j+1] = array[j];
			j--;
		array[j+1] = v;
		}
	    for(k = 0;k<n-1;k++)System.out.print(array[k]+" ");
	    if(i<(n-1))System.out.println(array[k]);
	    else System.out.print??????(array[k]);
	}
	}

}

Compiler output:
Main.java:23: error: illegal start of expression
	    else System.out.print??????(array[k]);
	                          ^
Main.java:23: error: illegal start of expression
	    else System.out.print??????(array[k]);
	                           ^
Main.java:23: error: illegal start of expression
	    else System.out.print??????(array[k]);
	                            ^
Main.java:23: error: illegal start of expression
	    else System.out.print??????(array[k]);
	                             ^
Main.java:23: error: illegal start of expression
	    else System.out.print??????(array[k]);
	                              ^
Main.java:23: error: : expected
	    else System.out.print??????(array[k]);
	                                         ^
Main.java:23: error: not a statement
	    else System.out.print??????(array[k]);
	                         ^
7 errors
Language: Java

import java.util.*;
public class Main{
	public static void insertion_sort(char A[]){
		int j,v,N;
		for(int i;i<=N-1;i++){
			v = A[i];
			j = i-1;
			while (j>=0 && A[j]>v){
				A[j+1] = A[j];
				j--;
				A[j+1] = v;
			}
		}
	}
}

Compiler output:
Main.java:11: error: incompatible types: possible lossy conversion from int to char
				A[j+1] = v;
				         ^
1 error
Language: Java

   public static void main(String args[]) throws IOException {
    	Scanner scan = new Scanner(System.in);
    	int n = scan.nextInt();
    	int a[] = new int[n];
    	int val;

    	for(int i=0;i<n;i++){
    		val = scan.nextInt();
    		a[i]=val;
    	}

    	int v;
    	int j;
    	for(int i=1;i<n;i++){
    		v=a[i];
    		j=i-1;
    		while(j>=0 && a[j]>v){
    			a[j+1]=a[j];
    			j--;
    		}
    		a[j+1]=v;
        	for(int f=0;f<n;f++){
        		System.out.print(a[f]+" ");

        	}
        	System.out.println();
    	}

    }

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
   public static void main(String args[]) throws IOException {
                 ^
  (use --enable-preview to enable unnamed classes)
1 error
Language: Java

class Test {
    public static void main(String args[]) throws IOException {
    	Scanner scan = new Scanner(System.in);
    	int n = scan.nextInt();
    	int a[] = new int[n];
    	int val;

    	for(int i=0;i<n;i++){
    		val = scan.nextInt();
    		a[i]=val;
    	}

    	int v;
    	int j;
    	for(int i=1;i<n;i++){
    		v=a[i];
    		j=i-1;
    		while(j>=0 && a[j]>v){
    			a[j+1]=a[j];
    			j--;
    		}
    		a[j+1]=v;
        	for(int f=0;f<n;f++){
        		System.out.print(a[f]+" ");

        	}
        	System.out.println();
    	}

    }
}

Compiler output:
Main.java:2: error: cannot find symbol
    public static void main(String args[]) throws IOException {
                                                  ^
  symbol:   class IOException
  location: class Test
Main.java:3: error: cannot find symbol
    	Scanner scan = new Scanner(System.in);
    	^
  symbol:   class Scanner
  location: class Test
Main.java:3: error: cannot find symbol
    	Scanner scan = new Scanner(System.in);
    	                   ^
  symbol:   class Scanner
  location: class Test
3 errors
Language: Java

import java.util.*;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class monndai1{
	public static void main(String [] args)throws Exception{
		BufferedReader Reader = new BufferedReader (new InputStreamReader(System.in));
		int j=0;
		int N = Integer.parseInt(Reader.readLine());
		String A[] = Reader.readLine().split(" ",0);
		for(int i=0;i<=N-1;i++){
			String v = A[i];
			j = i-1;
			while (j>=0 && Integer.parseInt(A[j])>Integer.parseInt(v)){
				A[j+1] = A[j];
				j--;
			}
			A[j+1] = v;
			System.out.println(String.join(" ",A));
		}
	}
}

Compiler output:
Main.java:4: error: class monndai1 is public, should be declared in a file named monndai1.java
public class monndai1{
       ^
1 error
Language: Java

import java.util.Scanner;

public class InsertS{

public static void f(int A[],int N){
int i;

for(i=0;i<N;i++){
	if(i>0)
		System.out.print(" ");
  System.out.print(A[i]);
}
 System.out.printf("\n");
}
 
 
   
public static void insertionSort(int A[],int N){
    int i,j,v;
    for(i=1;i<N;i++){
        v=A[i];
        j=i-1;
   while(j>=0 && A[j]>v){
       A[j+1]=A[j];
       j--;
}
   A[j+1]=v;
   
  f(A,N);
}
}
   


public static void main(String[] args){
         
		Scanner input=new Scanner(System.in);
	         int N=input.nextInt();
             int A[]=new int[100];
             
             int i;
             for(i=0;i<N;i++){
            	 A[i] = input.nextInt();
             }
	        
	   f(A,N);
       
        insertionSort(A,N);
}
}

Compiler output:
Main.java:3: error: class InsertS is public, should be declared in a file named InsertS.java
public class InsertS{
       ^
1 error
Language: Java

public class Main {
    public static void sort(int[] a) { sort(a, 0, a.length); }

    public static void sort(int[] a, int i0, int iN) {
        if (!(i0 < iN)) return;
       for (int i = 1; i < MAX; i++) 
   {
    int tmp = t[i];
    if (t[i-1] > tmp)
    {
      int j = i;
      do {
        t[j] = t[j-1];
        --j;
      } while ( j > 0 && t[j-1] > tmp);
      t[j] = tmp;
    }
}

Compiler output:
Main.java:18: error: reached end of file while parsing
}
 ^
1 error
Language: Java

public class Main {
    public static void sort(int[] a) { sort(a, 0, a.length); }

    public static void sort(int[] a, int i0, int iN) {
        if (!(i0 < iN)) return;
       for (int i = 1; i < MAX; i++) {
    int tmp = t[i];
    if (t[i-1] > tmp){
      int j = i;
      do {
        t[j] = t[j-1];
        --j;
      } while ( j > 0 && t[j-1] > tmp);
      t[j] = tmp;
    }
}

Compiler output:
Main.java:16: error: reached end of file while parsing
}
 ^
1 error
Language: Java

import java.util.Scanner;
 
public class Main {
    public static void sort(int[] a,int i){
        int key=a[i];
        int j=i-1;
        while(j>=0 && a[j]>key){
            a[j+1]=a[j];
            j--;
        }
        a[j+1]=key;
    }
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        int[] a=new int[n];
        for (int i=0;i<n;i++){
            a[i]=sc.nextInt();
        }
        for(int i=0;i<n;i++){
            sort(a,i);
            for(int k=0;k<n-1;k++){
                System.out.print(a[k]+" ");
            }
            System.out.println(a[n-1]);;
        }
    }

Compiler output:
Main.java:27: error: reached end of file while parsing
    }
     ^
1 error
Language: Java

import java.util.Scanner;
 
public class Main {
    public static void sort(int[] a,int i){
        int key=a[i];
        int j=i-1;
        while(j>=0 && a[j]>key){
            a[j+1]=a[j];
            j--;
        }
        a[j+1]=key;
    }
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        int[] a=new int[n];
        for (int i=0;i<n;i++){
            a[i]=sc.nextInt();
        }
        for(int i=0;i<n;i++){
            sort(a,i);
            for(int k=0;k<n-1;k++){
                System.out.print(a[k]+" ");
            }
            System.out.println(a[n-1]);;
    }
}

Compiler output:
Main.java:27: error: reached end of file while parsing
}
 ^
1 error
Language: Java

import java.util.Scanner;
 
public class Main {
    public static void sort(int[] a,int i){
        int key=a[i];
        int j=i-1;
        while(j>=0 && a[j]>key){
            a[j+1]=a[j];
            j--;
        }
        a[j+1]=key;
}
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        int[] a=new int[n];
        for (int i=0;i<n;i++){
            a[i]=sc.nextInt();
        }
        for(int i=0;i<n;i++){
            sort(a,i);
            for(int k=0;k<n-1;k++){
                System.out.print(a[k]+" ");
            }
            System.out.println(a[n-1]);;
        }
    }

Compiler output:
Main.java:27: error: reached end of file while parsing
    }
     ^
1 error
Language: Java

class Main
{
 
  public static void main(String[] args)
  {
    try{
    	// ??\???????????????
      BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
      int n = Integer.parseInt(br.readLine());
      String[] str = br.readLine().split(" ");
      int[] array = new int[n];
 
      for(int i = 0; i < n; i++){
        array[i] = Integer.parseInt(str[i]);
      }
      insertionSort(array, array.length);
 
    }catch(Exception e){
      System.out.println(e);
    }
  }
 
  public static void insertionSort(int[] A, int N)
  {
    StringBuilder sb = new StringBuilder();
    sb.append(show(A));
 
    for(int i = 1; i < N; ++i){
    	// key??£??\
      int key = A[i];
      // ????????????????????????????????£??\??????
      int j = i - 1;
      while(j >= 0 && A[j] > key){
    	  // ????????????
        A[j+1] = A[j];
        j--;
      }
      A[j+1] = key;
      sb.append(show(A));
    }
    System.out.print(sb);
  }
 
  public static String show(int[] B)
  {
    StringBuilder sb = new StringBuilder();
 
    for(int i = 0; i < B.length; i++){
      sb.append(B[i]).append(" ");
    }
    sb.deleteCharAt(sb.length() - 1);
    sb.append("\n");
 
    return sb.toString();
  }
}

Compiler output:
Main.java:8: error: cannot find symbol
      BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
      ^
  symbol:   class BufferedReader
  location: class Main
Main.java:8: error: cannot find symbol
      BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
                              ^
  symbol:   class BufferedReader
  location: class Main
Main.java:8: error: cannot find symbol
      BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
                                                 ^
  symbol:   class InputStreamReader
  location: class Main
3 errors
Language: Java

import java.util.Scanner;



	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		int i;
		int N;
		int A[] = new int [100];

		System.out.println("????´???°?????\???");
		N = scan.nextInt();

		for(i = 0; i < N; i++){


			System.out.println("??°????????\???");
			A[i] = scan.nextInt();
		}

		trace(N,A);
		InsertionSort(N,A);

	}

	static void trace(int N,int [] A){

		for(int i = 0; i < N; i++){

			if(i > 0)System.out.print("");

			System.out.print(A[i]);
		}
		System.out.print("\n");
	}

	static void InsertionSort(int N,int [] A){

		int i,j,v;

		for(i = 1; i < N; i++){

			v = A[i];
			j = i - 1;

			while(j >= 0 && A[j] > v){

				A[j + 1] = A[j];

				j--;
			}
			A[j + 1] = v;

			trace(N,A);

		}
	}

Compiler output:
Main.java:13: error: illegal escape character
		System.out.println("??????????????\???");
		                                   ^
Main.java:19: error: illegal escape character
			System.out.println("???????????\???");
			                                ^
Main.java:5: error: unnamed classes are a preview feature and are disabled by default.
	public static void main(String[] args) {
	              ^
  (use --enable-preview to enable unnamed classes)
Main.java:19: error: illegal start of expression
			System.out.println("???????????\???");
			                   ^
4 errors
Language: Java

import java.util.*;

public class Algo1{
	private static Scanner scan = new Scanner(System.in);
	public static void main(String[] args){
		int N = scan.nextInt();
		int[] A = new int[N];
		for(int i = 0; i < N; i++){
			A[i] = scan.nextInt();
		}

		for(int i = 0; i < N; i++){
			if(i != N - 1){
				System.out.printf("%d ", A[i]);
			}else{
				System.out.printf("%d\n", A[i]);
			}
		}

		// ??????????????????
		for(int i = 1; i < N; i++){
			int v = A[i];
			int j = i - 1;
			while(j >= 0 && A[j] > v){
				A[j+1] = A[j];
				j--;
				A[j+1] = v;
			}
			for(int j = 0; j < N; j++){
				if(j != N){
					System.out.printf("%d ", A[j]);
				}else{
					System.out.printf("%d\n", A[j]);
				}
			}
		}
	}
}

Compiler output:
Main.java:3: error: class Algo1 is public, should be declared in a file named Algo1.java
public class Algo1{
       ^
Main.java:29: error: variable j is already defined in method main(String[])
			for(int j = 0; j < N; j++){
			        ^
2 errors
Language: Java

import jaba.io.*;
class Main{

public static void main(String[] args){
try{
BufferedReader br = new BufferedReader (new InputStreamReader(System.in));
int n = Integer.parseInt(br.readLine());
String [] str = br.readLine().split(" ");
int[] array = new int[n];

for (int i = 0; i<n; i++){
array[i] = Integer.parseInt(str[i]):
}

insertionSort(array,array.length);
}catch(Exception e){
System.out.println(e);
}

}
public static void insertionSort(int[]A,int N){

StringBuilder sb = new StringBuilder();
sb.append(show(A));

for(int i=1;i <N; i++){
int v = A[i];
int j = i-1;
while(j>=0 && A[j]>v){
A[j+1] = A[j];
j--;
}
A[j+1] = v;
sb.append(show(A));
}
System.out.print(sb);
}

public static String show(int[]B){
StringBuilder sb = new StringBuilder());
for(int i =0;i<B.length; i++){
sb.append(B[i]).append(" ");

}
sb.deleteCharAt(sb.length() -1);
sb.append("\n");
return sb.toString();
}
}

Compiler output:
Main.java:12: error: ';' expected
array[i] = Integer.parseInt(str[i]):
                                   ^
Main.java:40: error: ';' expected
StringBuilder sb = new StringBuilder());
                                      ^
2 errors
Language: Java

import java.io.*;
/**
 *
 * @author Y
 */


public class Aizu {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        int N = 0;
        try{
            InputStreamReader is = new InputStreamReader(System.in);
            BufferedReader br = new BufferedReader(is);
            N = Integer.parseInt(br.readLine());
            String[] sp = br.readLine().split(" "); 
            int[] a = new int[N];
                
            for(int i = 0;i<N;i++){
                a[i] = Integer.parseInt(sp[i]);
            } 
            insort(a);
            
            
        }catch(Exception e){
        }
        
    }
    public static void insort(int[] a){
        for(int i = 1; i<=a.length; i ++){
            int key = a[i];
            int j = i-1;
            while(j>=0 && a[j]>key){
                a[j+1] = a[j];
                j--;
            }
            a[j+1]  = key;
            for(int k : a){
                System.out.print(k + " ");
            }
            System.out.println();
        }
    } 
}

Compiler output:
Main.java:8: error: class Aizu is public, should be declared in a file named Aizu.java
public class Aizu {
       ^
1 error
Language: Java

package aizu;

import java.io.*;
/**
 *
 * @author Y
 */


public class Aizu {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        int N = 0;
        try{
            InputStreamReader is = new InputStreamReader(System.in);
            BufferedReader br = new BufferedReader(is);
            N = Integer.parseInt(br.readLine());
            String[] sp = br.readLine().split(" "); 
            int[] a = new int[N];
                
            for(int i = 0;i<N;i++){
                a[i] = Integer.parseInt(sp[i]);
            } 
            insort(a);
            
            
        }catch(Exception e){
        }
        
    }
    public static void insort(int[] a){
        for(int i = 1; i<=a.length; i ++){
            int key = a[i];
            int j = i-1;
            while(j>=0 && a[j]>key){
                a[j+1] = a[j];
                j--;
            }
            a[j+1]  = key;
            for(int k : a){
                System.out.print(k + " ");
            }
            System.out.println();
        }
    } 
}

Compiler output:
Main.java:10: error: class Aizu is public, should be declared in a file named Aizu.java
public class Aizu {
       ^
1 error
Language: Java

import java.io.*;



public class Aizu {

    
    public static void main(String[] args) {
        int N = 0;
        try{
            InputStreamReader is = new InputStreamReader(System.in);
            BufferedReader br = new BufferedReader(is);
            N = Integer.parseInt(br.readLine());
            String[] sp = br.readLine().split(" "); 
            int[] a = new int[N];
                
            for(int i = 0;i<N;i++){
                a[i] = Integer.parseInt(sp[i]);
            } 
            insort(a);
            
            
        }catch(Exception e){
        }
        
    }
    public static void insort(int[] a){
        for(int i = 1; i<=a.length; i ++){
            int key = a[i];
            int j = i-1;
            while(j>=0 && a[j]>key){
                a[j+1] = a[j];
                j--;
            }
            a[j+1]  = key;
            for(int k : a){
                System.out.print(k + " ");
            }
            System.out.println();
        }
    } 
}

Compiler output:
Main.java:5: error: class Aizu is public, should be declared in a file named Aizu.java
public class Aizu {
       ^
1 error
Language: Java

class Aizu {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        int N = 0;
        try{
            InputStreamReader is = new InputStreamReader(System.in);
            BufferedReader br = new BufferedReader(is);
            N = Integer.parseInt(br.readLine());
            String[] sp = br.readLine().split(" "); 
            int[] a = new int[N];
                
            for(int i = 0;i<N;i++){
                a[i] = Integer.parseInt(sp[i]);
            } 
            insort(a);
            
            
        }catch(Exception e){
        }
        
    }
    public static void insort(int[] a){
        for(int i = 1; i<=a.length; i ++){
            int key = a[i];
            int j = i-1;
            while(j>=0 && a[j]>key){
                a[j+1] = a[j];
                j--;
            }
            a[j+1]  = key;
            for(int k : a){
                System.out.print(k + " ");
            }
            System.out.println();
        }
    } 
}

Compiler output:
Main.java:9: error: cannot find symbol
            InputStreamReader is = new InputStreamReader(System.in);
            ^
  symbol:   class InputStreamReader
  location: class Aizu
Main.java:9: error: cannot find symbol
            InputStreamReader is = new InputStreamReader(System.in);
                                       ^
  symbol:   class InputStreamReader
  location: class Aizu
Main.java:10: error: cannot find symbol
            BufferedReader br = new BufferedReader(is);
            ^
  symbol:   class BufferedReader
  location: class Aizu
Main.java:10: error: cannot find symbol
            BufferedReader br = new BufferedReader(is);
                                    ^
  symbol:   class BufferedReader
  location: class Aizu
4 errors
Language: Java

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		sc.useDelimiter(System.getProperty("line.separator"));
        int n = sc.nextInt();
        String data = sc.next();

        //String???Int????????????
        String[] datas = data.split(" ");
        int[] A = new int[n];
        for (int i = 0; i < A.length; i++) {
			A[i] = Integer.parseInt(datas[i]);
		}

        //disp
    	disp(A);

        for (int i = 1; i < n; i++) {
        	//ex. 5,3 = 3
        	int v = A[i];
        	//ex. 5,3 = 5
        	int j = i -1;

        	//              5  > 3
        	while(j>=0 && A[j] > v){
        		A[j+1] = A[j];
        		j--;
        	}
        	A[j+1] = v;

        	//disp
        	disp(A);


		}
	}

	private static void disp(int[] a) {
		for (int i = 0; i < a.length; i++) {
			System.out.print(a[i]);
			if(i!=a.length-1)System.out.print(" ");
		}
		System.out.println();
	}

}

Compiler output:
Main.java:4: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:4: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		                 ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: Java

import java.util.Scanner;

public class Algorithm1 {
	public static void main(String[] args) {
		int N;
		int[] A = new int[100] ;

		Scanner stdIn = new Scanner(System.in);

		N = stdIn.nextInt();
		for(int i = 0; i < N; i++){
			A[i] = stdIn.nextInt();
		}

		trace(A, N);
		insertionSort(A, N);
	}

	public static void insertionSort(int[] A, int N){
		int i, j , v;
		for(i = 1; i < N; i++){
			v = A[i];
			j = i - 1;
			while (j >= 0 && v < A[j]){
				A[j + 1] = A[j];
				j--;
			}
			A[j + 1] = v;
			trace(A, N);
		}
	}
	public static void trace(int[] A, int N){
		for(int i= 0; i < N; i++){
			if( i > 0)	System.out.print(" ");
		System.out.print(A[i]);
		}
		System.out.println();
	}
}

Compiler output:
Main.java:3: error: class Algorithm1 is public, should be declared in a file named Algorithm1.java
public class Algorithm1 {
       ^
1 error
Language: Java

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int a[] = new int[n];
		for(int j = 0; j < n; j++){
			a[j] = scan.nextInt();
		}
		scan.close();
		InsertionSort(a, n);
	}

	static void InsertionSort(int A[], int N){
		print(A);
		for(int i = 1; i <= N - 1; i++){
			int v = A[i];
			int j = i - 1;
			while(j >= 0 && A[j] > v){
				A[j + 1] = A[j];
				j--;
			}
			A[j + 1] = v;
			print(A);
		}
	}

	static void print(int A[]){
		for(int k = 0; k < A.length; k++){
			if(k == A.length - 1){
				System.out.println(A[k]);
			}else{
				System.out.print(A[k] + " ");
			}
		}
	}
}

Compiler output:
Main.java:3: error: cannot find symbol
		Scanner scan = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
		Scanner scan = new Scanner(System.in);
		                   ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: Java

import java.util.*;
class Main{
    public static void main(String[]args){
        Scanner cin=new Scanner(System.in);
        int length;
        int tmp;
        length=cin.nextInt();
        int list[] = new int[length];
        
        for(int i=0;i<lenght-1;i++){
            list[i] = cin.nextInt();        
        }
        for(int j = 0;j<length-1;j++){
            tmp = list[j];
            if(j-1>=0 && list[j-1]>tmp){
                list[j] = list[j-1];
                list[j-1] = tmp;
            }
            System.out.println(list);
        }
        
    }
}

Compiler output:
Main.java:10: error: cannot find symbol
        for(int i=0;i<lenght-1;i++){
                      ^
  symbol:   variable lenght
  location: class Main
1 error
Language: Java

import java.util.*;
class Main{
    public static void main(String[]args){
        Scanner cin=new Scanner(System.in);
        int length;
        int tmp;
        length=cin.nextInt();
        int list[] = new int[length];
        
        for(int i=0;i<(lenght-1);i++){
            list[i] = cin.nextInt();        
        }
        for(int j = 0;j<length-1;j++){
            tmp = list[j];
            if(j-1>=0 && list[j-1]>tmp){
                list[j] = list[j-1];
                list[j-1] = tmp;
            }
            System.out.println(list);
        }
        
    }
}

Compiler output:
Main.java:10: error: cannot find symbol
        for(int i=0;i<(lenght-1);i++){
                       ^
  symbol:   variable lenght
  location: class Main
1 error
Language: Java

package Introduction;

import java.util.ArrayList;
import java.util.Scanner;
//import java.util.List;

/**
 * Created by shoya on 2017/04/11.
 */
public class InsertionSort {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        ArrayList<Integer> ar = new ArrayList<>();
        for (int i = 0; i < n; i++)
            ar.add(sc.nextInt());
        //System.out.println(ar);
        insertionSort(ar);
    }

    static ArrayList<Integer> insertionSort(ArrayList<Integer> ar){
        for (int i = 0; i < ar.size(); i++){
            for (int j = 0; j < i; j++){
                if (ar.get(j) > ar.get(i)){
                    for (int k = i; k > j; k--){
                        int tmp = ar.get(k - 1);
                        ar.set(k - 1, ar.get(k));
                        ar.set(k, tmp);
                    }
                }
            }
            for (int n = 0; n < ar.size(); n++)
                System.out.printf("%d ", ar.get(n));
            System.out.println();
        }
        return ar;
    }

}

Compiler output:
Main.java:10: error: class InsertionSort is public, should be declared in a file named InsertionSort.java
public class InsertionSort {
       ^
1 error
Language: Java

import java.util.Scanner;

public class InsersionSort {
    static void checkArray(int[] a){
        for( int i = 0; i < a.length; i++){
                System.out.print(a[i] +" ");
        }
        System.out.println();
    }
    
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        
        int[] arr = new int[N];
        for(int i = 0; i < N; i++) {
            arr[i] = sc.nextInt();
        }
        
        checkArray(arr);
        
        for(int i = 1; i <= N-1; i++) {
            int v = arr[i];
            int j = i - 1;
            while(j >= 0 && arr[j] > v ) {
                arr[j+1] = arr[j];
                j--;
            }
            arr[j+1] = v;
            checkArray(arr);
        }   
    }   
}

Compiler output:
Main.java:3: error: class InsersionSort is public, should be declared in a file named InsersionSort.java
public class InsersionSort {
       ^
1 error
Language: Java


import java.util.Scanner;

public class ALDS_1_A {

	public static void main(String[] args) {
		Scanner sc = new Scanner (System.in);
		int N =sc.nextInt();
		int [] A = new int[N];
		String[]str = sc.nextLine().split(" ");
		for(int i=1 ; i < str.length; i++  ){
			A[i] = Integer.parseInt(str[i]);
		}
		show(A);
		for(int i =1; i < N ; i++){
			int v = A[i];
			int j = i-1;
			while(j >= 0 && A[j] > v){
				A[j+1] = A[j];
				j --;
			}
			A[j+1] = v;
			show(A)	;
			}	
	}
	public static void show(int[] A){
		String op = "";
		for (int i = 0 ; i < A.length; i++){
			op += A[i];
			if(i != A.length -1){
				op += " ";
			}
		}
		System.out.println(op); 
	}
	
}

Compiler output:
Main.java:4: error: class ALDS_1_A is public, should be declared in a file named ALDS_1_A.java
public class ALDS_1_A {
       ^
1 error
Language: Java

import java.util.Scanner;

public class ALDS_1_A {

	public static void main(String[] args) {
		Scanner sc = new Scanner (System.in);
		int N =sc.nextInt();
		int [] A = new int[N];
		String[]str = sc.nextLine().split(" ");
		for(int i=1 ; i < str.length; i++  ){
			A[i] = Integer.parseInt(str[i]);
		}
		show(A);
		for(int i =1; i < N ; i++){
			int v = A[i];
			int j = i-1;
			while(j >= 0 && A[j] > v){
				A[j+1] = A[j];
				j --;
			}
			A[j+1] = v;
			show(A)	;
			}	
	}
	public static void show(int[] A){
		StringBuilder sb = new StringBuilder();
		for (int i = 0 ; i < A.length; i++){
			sb.append(A[i]);
			if(i != A.length -1){
				sb.append(" ");
			}
		}
		System.out.println(sb); 
	}
	

Compiler output:
Main.java:34: error: reached end of file while parsing
	}
	 ^
1 error
Language: Java

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner (System.in);
		int N =sc.nextInt();
		int [] A = new int[N];
		String[]str = sc.nextLine().split(" ");
		for(int i=1 ; i < str.length; i++  ){
			A[i] = Integer.parseInt(str[i]);
		}
		show(A);
		for(int i =1; i < N ; i++){
			int v = A[i];
			int j = i-1;
			while(j >= 0 && A[j] > v){
				A[j+1] = A[j];
				j --;
			}
			A[j+1] = v;
			show(A)	;
			}	
	}
	public static void show(int[] A){
		StringBuilder sb = new StringBuilder();
		for (int i = 0 ; i < A.length; i++){
			sb.append(A[i]);
			if(i != A.length -1){
				sb.append(" ");
			}
		}
		System.out.println(sb); 
	}
	

Compiler output:
Main.java:34: error: reached end of file while parsing
	}
	 ^
1 error
Language: Java

package algo1_1a;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class InsertionSort {

	public static void main(String[] args) throws NumberFormatException, IOException {
		// TODO ?????????????????????????????????????????????
		int input[] = new int[100];
		int numOfInput;

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		numOfInput = Integer.parseInt(br.readLine());

		String tmpArray[] = br.readLine().split(" ");

		for(int i = 0; i < tmpArray.length ; i++){
			input[i] = Integer.parseInt(tmpArray[i]);
		}

		insertionSort(input, numOfInput);
		

	}

	public static void insertionSort(int[] array, int n){
		for(int i = 1; i <= n - 1; i++){
			int v = array[i];
			int j = i - 1;
			while (j >= 0 && array[j] > v){
				array[j+1] = array[j];
				j--;
			}
			array[j+1] = v;
			
			printArray(array, n);
		}
	}
	
	public static void printArray(int[] array, int n){
		for(int i = 0; i < n ; i++){
			System.out.print(array[i]);
			if(i < n - 1){
				System.out.print(" ");
			}
			else{
				System.out.println();
			}
		}
	}

}

Compiler output:
Main.java:7: error: class InsertionSort is public, should be declared in a file named InsertionSort.java
public class InsertionSort {
       ^
1 error