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

import java.util.*;
class Main{
    public static void main(String[] args){
        Scanner stdIn = new Scanner(System.in);
        int n = stdIn.nextInt();
        int i;
        int[] a = new int[n];
        for(i=0; i<n; i++)
            a[i] = stdIn.nextInt();

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

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

import java.util.*;

class Mian{
    public static void main(String[] args){
        Scanner stdIn = new Scanner(System.in);
        int n = stdIn.nextInt();
        int[] A = new int[n];
        int i;
        for(i=0; i<n; i++) A[i] = stdIn.nextInt();
        printArray(A, n);
        int j, key;
        for(i=1; i<n-1; i++){
            key = A[i];
            j = i-1;
            while(j != 0 && A[j] > key){
                A[j+1] = A[j];
                j--;
            }
            A[j] = key;
            printArray(A,n);
    }

    public void printArray(int[] array, int num){
        for(int a=0; a<num; a++) System.out.print(array[a]+ " ");
        System.out.println();
    }
}

Compiler output:
Main.java:23: error: illegal start of expression
    public void printArray(int[] array, int num){
    ^
1 error
Language: Java

import java.util.*;
 
class Mian{
    public static void main(String[] args){
        Scanner stdIn = new Scanner(System.in);
        int n = stdIn.nextInt();
        int[] A = new int[n];
        int i;
        for(i=0; i<n; i++) A[i] = stdIn.nextInt();
        printArray(A, n);
        int j, key;
        for(i=1; i<n-1; i++){
            key = A[i];
            j = i-1;
            while(j != 0 && A[j] > key){
                A[j+1] = A[j];
                j--;
            }
            A[j] = key;
            printArray(A,n);
        }
    }
 
    void printArray(int[] array, int length){
        for(int a=0; a<length; a++) System.out.print(array[a]+ " ");
        System.out.println();
    }
}

Compiler output:
Main.java:10: error: non-static method printArray(int[],int) cannot be referenced from a static context
        printArray(A, n);
        ^
Main.java:20: error: non-static method printArray(int[],int) cannot be referenced from a static context
            printArray(A,n);
            ^
2 errors
Language: Java

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

Compiler output:
Main.java:10: error: cannot find symbol
        for(int a=0; a<length; a++) System.out.print(array[a]+ " ");
                       ^
  symbol:   variable length
  location: class Main
Main.java:10: error: cannot find symbol
        for(int a=0; a<length; a++) System.out.print(array[a]+ " ");
                                                     ^
  symbol:   variable array
  location: class Main
Main.java:21: error: cannot find symbol
            for(int a=0; a<length; a++) System.out.print(array[a]+ " ");
                           ^
  symbol:   variable length
  location: class Main
Main.java:21: error: cannot find symbol
            for(int a=0; a<length; a++) System.out.print(array[a]+ " ");
                                                         ^
  symbol:   variable array
  location: class Main
4 errors
Language: Java

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

Compiler output:
Main.java:1: error: class, interface, enum, or record expected
mport java.util.*;
^
1 error
Language: Java

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

Compiler output:
Main.java:1: error: class, interface, enum, or record expected
mport java.util.*;
^
Main.java:20: error: ';' expected
            printArray(A, n)
                            ^
2 errors
Language: Java

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

Compiler output:
Main.java:25: error: cannot find symbol
        for(int a = 0; a<n; a++) System.out.print(array[a]+ " ");
                         ^
  symbol:   variable n
  location: class Main
1 error
Language: Java

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

Compiler output:
Main.java:25: error: ';' expected
        for(int a = 0; a<n; a++) {System.out.print(array[a]+ " ")};
                                                                 ^
1 error
Language: Java

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

Compiler output:
Main.java:25: error: illegal start of expression
        private int a;
        ^
Main.java:26: error: illegal start of type
        for(a = 0; a<n; a++) System.out.print(array[a]+ " ");
        ^
Main.java:26: error: <identifier> expected
        for(a = 0; a<n; a++) System.out.print(array[a]+ " ");
             ^
Main.java:26: error: > or ',' expected
        for(a = 0; a<n; a++) System.out.print(array[a]+ " ");
                      ^
Main.java:26: error: <identifier> expected
        for(a = 0; a<n; a++) System.out.print(array[a]+ " ");
                         ^
Main.java:26: error: <identifier> expected
        for(a = 0; a<n; a++) System.out.print(array[a]+ " ");
                                             ^
Main.java:26: error: ']' expected
        for(a = 0; a<n; a++) System.out.print(array[a]+ " ");
                                                    ^
Main.java:26: error: ',', ')', or '[' expected
        for(a = 0; a<n; a++) System.out.print(array[a]+ " ");
                                                     ^
Main.java:27: error: <identifier> expected
        System.out.println();
                          ^
Main.java:29: error: class, interface, enum, or record expected
}
^
10 errors
Language: Java

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

Compiler output:
Main.java:26: error: cannot find symbol
        for(a = 0; a<n; a++) System.out.print(array[a]+ " ");
                     ^
  symbol:   variable n
  location: class Main
1 error
Language: Java

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

Compiler output:
Main.java:26: error: cannot find symbol
        for(a = 0; a<n; a++) System.out.print(array[a]+ " ");
                     ^
  symbol:   variable n
  location: class Main
1 error
Language: Java

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

Compiler output:
Main.java:27: error: array required, but int found
        System.out.println(a[num-1]);
                            ^
1 error
Language: Java

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

Compiler output:
Main.java:10: error: ';' expected
        System.out.println(A)//printArray(A, n);
                             ^
Main.java:22: error: reached end of file while parsing
    }
     ^
2 errors
Language: Java

import java.util.Scanner;
import org.apache.commons.lang.ArrayUtils;
              
class Main{
    public static void main(String[] args){
        Scanner stdIn = new Scanner(System.in);
        int n = stdIn.nextInt();
        int[] A = new int[n];
        int i;
        for(i=0; i<n; i++) A[i] = stdIn.nextInt();
        System.out.println(ArrayUtils.toString(A, "null"));
        int j, key;
        for(i=1; i<n-1; i++){
            key = A[i];
            j = i-1;
            while(j >= 0 && A[j] > key){
                A[j+1] = A[j];
                j--;
            }
            A[j] = key;
            System.out.println(ArrayUtils.toString(A, "null"));
        }
    }
             
/*    public static void printArray(int[] array, int num){
        int a;
        for(a = 0; a<(num-1); a++) System.out.print(array[a]+ " ");
        System.out.println(a[num-1]);
    }*/
}

Compiler output:
Main.java:2: error: package org.apache.commons.lang does not exist
import org.apache.commons.lang.ArrayUtils;
                              ^
Main.java:11: error: cannot find symbol
        System.out.println(ArrayUtils.toString(A, "null"));
                           ^
  symbol:   variable ArrayUtils
  location: class Main
Main.java:21: error: cannot find symbol
            System.out.println(ArrayUtils.toString(A, "null"));
                               ^
  symbol:   variable ArrayUtils
  location: class Main
3 errors
Language: Java

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

Compiler output:
Main.java:21: error: ';' expected
            printArray(A, n)
                            ^
1 error
Language: Java

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

Compiler output:
Main.java:28: error: array required, but int found
        System.out.println(a[num-1]);
                            ^
1 error
Language: Java

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

/**
 * ?????\??????????????????
 *
 * @author SS Tokyo100
 */
public class Insertion_Sort {
	// ??????????´???¨???
	static void ALView(int A[]) {
		for (int i = 0; i < A.length; i++) {
			System.out.print(A[i] + " ");
		}
		System.out.println("\n");
	}

	public static void main(String[] args) throws IOException {
		InputStreamReader isr = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(isr);

		// ???????????¨???????????£?¨?
		int Alst[];
		// ??\??????????´???¨?????£?¨?
		String buf;

		try {
			// ????´???°?????\???
			buf = br.readLine();
			int arry_num = Integer.parseInt(buf);

			// ????´??????\???
			buf = br.readLine();
			String[] tmp = buf.split(" ");

			// ??????????????????
			Alst = new int[arry_num];

			// ????????¨???????´?
			for (int i = 0; i <= arry_num - 1; i++) {
				Alst[i] = Integer.parseInt(tmp[i]);
			}

			// ?????\??????????????????
			for (int i = 1; i < arry_num; i++) {

				// ?????°?????£?¨?
				int v = Alst[i];
				int j = i - 1;

				// ??????????´???¨???
				ALView(Alst);
				while (j >= 0 && Alst[j] > v) {
					Alst[j + 1] = Alst[j];
					j--;
				}
				Alst[j + 1] = v;
			}
			// ??????????´???¨???
			ALView(Alst);
		} catch (NumberFormatException e) {
			System.out.print("??°????????\????????????????????????");
		}

	}

}

Compiler output:
Main.java:63: error: illegal escape character
			System.out.print("???????????\????????????????????????");
			                              ^
1 error
Language: Java

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

/**
 * ?????\??????????????????
 *
 * @author SS
 */
public class Insertion_Sort {
	// ??????????´???¨???
	static void ALView(int A[]) {
		for (int i = 0; i < A.length; i++) {
			System.out.print(A[i] + " ");
		}
		System.out.println("\n");
	}

	public static void main(String[] args) throws IOException {
		InputStreamReader isr = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(isr);

		// ???????????¨???????????£?¨?
		int Alst[];
		// ??\??????????´???¨?????£?¨?
		String buf;

		try {
			// ????´???°?????\???
			buf = br.readLine();
			int arry_num = Integer.parseInt(buf);

			// ????´??????\???
			buf = br.readLine();
			String[] tmp = buf.split(" ");

			// ??????????????????
			Alst = new int[arry_num];

			// ????????¨???????´?
			for (int i = 0; i <= arry_num - 1; i++) {
				Alst[i] = Integer.parseInt(tmp[i]);
			}

			// ?????\??????????????????
			for (int i = 1; i < arry_num; i++) {

				// ?????°?????£?¨?
				int v = Alst[i];
				int j = i - 1;

				// ??????????´???¨???
				ALView(Alst);
				while (j >= 0 && Alst[j] > v) {
					Alst[j + 1] = Alst[j];
					j--;
				}
				Alst[j + 1] = v;
			}
			// ??????????´???¨???
			ALView(Alst);
		} catch (NumberFormatException e) {
			System.out.print("??°????????\????????????????????????");
		}

	}

}

Compiler output:
Main.java:63: error: illegal escape character
			System.out.print("???????????\????????????????????????");
			                              ^
1 error
Language: Java

import java.io.*;

public class Main {
    public static void main(String[] args) throws IOException{
        InputStreamReader is = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(is);
        int n = Integer.parseInt(br.readLine());
        int[] A = new int[n];
        int i, j, v;
         
        for(i=0; i<n; i++){
            A[i] = Integer.parseInt(br.read());
            System.out.print(A[i]+ " ");
        }
        System.out.println();
        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;
            for(int k = 0; k<n; k++)
                System.out.print(A[k]+ " ");
            System.out.println();
        }
    }
}

Compiler output:
Main.java:12: error: incompatible types: int cannot be converted to String
            A[i] = Integer.parseInt(br.read());
                                           ^
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
1 error
Language: Java

import java.io.*;
  
public class Main {
    public static void main(String[] args) throws IOException{
        InputStreamReader is = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(is);
        int n = Integer.parseInt(br.readLine());
        String S = br.readLine().split(" ", 0);
        int[] A = new int[n];
        int i, j, v;
           
        for(i=0; i<n; i++){
            A[i] = Integer.parseInt(S[i]);
            System.out.print(A[i]+ " ");
        }
        System.out.println();
        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;
            for(int k = 0; k<n; k++)
                System.out.print(A[k]+ " ");
            System.out.println();
        }
    }
}

Compiler output:
Main.java:8: error: incompatible types: String[] cannot be converted to String
        String S = br.readLine().split(" ", 0);
                                      ^
Main.java:13: error: array required, but String found
            A[i] = Integer.parseInt(S[i]);
                                     ^
2 errors
Language: Java

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

Compiler output:
Main.java:14: error: incompatible types: String cannot be converted to int
            v = A[i];
                 ^
Main.java:16: error: incompatible types: int cannot be converted to String
            while(j>=0 && Integer.parseInt(v)<Integer.parseInt(A[j])){
                                           ^
Main.java:20: error: incompatible types: int cannot be converted to String
            A[j+1] = v;
                     ^
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
3 errors
Language: Java

import java.util.*;

public class Main{
	public static void main(String[] args)
	{
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int tar;
		
		List<Integer> lis = new LinkedList<>();
		for( int i=0 ;i < n ;i ++){
			lis.add(sc.nextInt());
		}
		for(int j = 1 ; j < n ; j++)
		{
			tar = lis.get(j);
			int k = j - 1 ;
			while( k >= 0 && lis.get(k) > tar )
			{
				k--;
				ch1 = true;
			}
			
			if( k++ != j - 1 ){
				lis.remove(j);
				lis.add(k,tar);
				
				for(int i=0; i<n-1 ; i++){
				System.out.print(lis.get(i)+" ");
				}
				System.out.println(lis.get(n-1)+"");
			}
		
		}
		for(int i=0; i<n-1 ; i++){
			System.out.print(lis.get(i)+" ");
		}
		System.out.println(lis.get(n-1)+"");
	}
}

Compiler output:
Main.java:21: error: cannot find symbol
				ch1 = true;
				^
  symbol:   variable ch1
  location: class Main
1 error
Language: Java

public class Answer {
    public static void main(String[] args) {
        for(int i = 0; i < args.length; i++) {
            System.out.println(args[i]);
        }
        System.out.println("end");
    }
}

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

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

class Main{
	public static void main(String[] args)throws Exception{
		BufferedReader br = 
			new BufferedReader(new InputStreamReader(System.in));
		int n = br.read();
		String[] numbers = br.readLine().split(" ");
		int[] data = new int[n];
		int v = 0;
		int j = 0;

		for(int i = 0; i < n; i++){
			data[i] = Integer.parseInt(numbers[i]);
		}

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

			for(int k = 0; k < n; k++){
				System.out.print(data[k]);
			}
			System.out.print("\n");
		}

		
	}
}

Compiler output:
Main.java:23: error: ';' expected
				j--
				   ^
1 error
Language: Java

import java.util.Scanner;

public class InsertionSortMain{

	public static void insertionSort(int A[],int N){
		for(int k=0;k<N-1;k++){
			System.out.print(A[k]+" ");
		}
		System.out.println(A[N-1]);
		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 k=0;k<N-1;k++){
				System.out.print(A[k]+" ");
			}
			System.out.println(A[N-1]);
		}
		
	}

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

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

		insertionSort(array,n);
		
		
			
		scan.close();
	}

}

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

import java.util.Scanner;

public class ALDS1_01_A {
	
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		////////////////////////////////////
		int n = 0;
		int[] A;
		
		n = sc.nextInt();
		sc.nextLine();
		A = new int[n];
		for (int i = 0; i < n; ++i)
			A[i] = sc.nextInt();
		
		_insertionSort.print(A);
		_insertionSort.sort(A, n);
		
		////////////////////////////////////
		sc.close();
	}
	
}

Compiler output:
Main.java:3: error: class ALDS1_01_A is public, should be declared in a file named ALDS1_01_A.java
public class ALDS1_01_A {
       ^
Main.java:17: error: cannot find symbol
		_insertionSort.print(A);
		^
  symbol:   variable _insertionSort
  location: class ALDS1_01_A
Main.java:18: error: cannot find symbol
		_insertionSort.sort(A, n);
		^
  symbol:   variable _insertionSort
  location: class ALDS1_01_A
3 errors
Language: Java

class _insertionSort {
	
	// Default Constructor
	public void _insetrionSort() {
	}
	
	// sort method :: sort given array using insertion Sort
	public static void sort(int[] _A, int _n) {
		for (int i = 1; i < _n; ++i) {
			
			// print(_A);
			int tmp = _A[i];
			int j = i - 1;
			while (j >= 0 && _A[j] > tmp) {
				_A[j + 1] = _A[j];
				--j;
			}
			_A[j + 1] = tmp;
			print(_A);
			// System.out.println("i = " + i);
		}
		
	}
	
	// print method :: print array
	public static void print(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();
	}
	
}

import java.util.Scanner;

public class ALDS1_01_A {
	
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		////////////////////////////////////
		int n = 0;
		int[] A;
		
		n = sc.nextInt();
		sc.nextLine();
		A = new int[n];
		for (int i = 0; i < n; ++i)
			A[i] = sc.nextInt();
		
		_insertionSort.print(A);
		_insertionSort.sort(A, n);
		
		////////////////////////////////////
		sc.close();
	}
	
}

Compiler output:
Main.java:37: error: class, interface, enum, or record expected
import java.util.Scanner;
^
1 error
Language: Java

import java.util.Scanner;

class _insertionSort {
	
	// Default Constructor
	public void _insetrionSort() {
	}
	
	// sort method :: sort given array using insertion Sort
	public static void sort(int[] _A, int _n) {
		for (int i = 1; i < _n; ++i) {
			
			// print(_A);
			int tmp = _A[i];
			int j = i - 1;
			while (j >= 0 && _A[j] > tmp) {
				_A[j + 1] = _A[j];
				--j;
			}
			_A[j + 1] = tmp;
			print(_A);
			// System.out.println("i = " + i);
		}
		
	}
	
	// print method :: print array
	public static void print(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();
	}
	
}


public class ALDS1_01_A {
	
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		////////////////////////////////////
		int n = 0;
		int[] A;
		
		n = sc.nextInt();
		sc.nextLine();
		A = new int[n];
		for (int i = 0; i < n; ++i)
			A[i] = sc.nextInt();
		
		_insertionSort.print(A);
		_insertionSort.sort(A, n);
		
		////////////////////////////////////
		sc.close();
	}
	
}

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

import java.util.Scanner;

class _insertionSort {
	
	// Default Constructor
	public void _insetrionSort() {
	}
	
	// sort method :: sort given array using insertion Sort
	public static void sort(int[] _A, int _n) {
		for (int i = 1; i < _n; ++i) {
			
			// print(_A);
			int tmp = _A[i];
			int j = i - 1;
			while (j >= 0 && _A[j] > tmp) {
				_A[j + 1] = _A[j];
				--j;
			}
			_A[j + 1] = tmp;
			print(_A);
			// System.out.println("i = " + i);
		}
		
	}
	
	// print method :: print array
	public static void print(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();
	}
	
}


public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);
	////////////////////////////////////
????????????int n = 0;
	int[] A;
	
	n = sc.nextInt();
	sc.nextLine();
	A = new int[n];
	for (int i = 0; i < n; ++i)
		A[i] = sc.nextInt();
	
	_insertionSort.print(A);
	_insertionSort.sort(A, n);
	
	////////////////////////////////////
	sc.close();
}

Compiler output:
Main.java:43: error: not a statement
????????????int n = 0;
^
Main.java:40: 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:43: error: illegal start of expression
????????????int n = 0;
 ^
Main.java:43: error: illegal start of expression
????????????int n = 0;
  ^
Main.java:43: error: illegal start of expression
????????????int n = 0;
   ^
Main.java:43: error: illegal start of expression
????????????int n = 0;
    ^
Main.java:43: error: illegal start of expression
????????????int n = 0;
     ^
Main.java:43: error: illegal start of expression
????????????int n = 0;
      ^
Main.java:43: error: illegal start of expression
????????????int n = 0;
       ^
Main.java:43: error: illegal start of expression
????????????int n = 0;
        ^
Main.java:43: error: illegal start of expression
????????????int n = 0;
         ^
Main.java:43: error: illegal start of expression
????????????int n = 0;
          ^
Main.java:43: error: illegal start of expression
????????????int n = 0;
           ^
Main.java:43: error: '.class' expected
????????????int n = 0;
                ^
Main.java:43: error: : expected
????????????int n = 0;
                     ^
15 errors
Language: Java

import java.util.Scanner;

class _insertionSort {
	
	// Default Constructor
	public void _insetrionSort() {
	}
	
	// sort method :: sort given array using insertion Sort
	public static void sort(int[] _A, int _n) {
		for (int i = 1; i < _n; ++i) {
			
			// print(_A);
			int tmp = _A[i];
			int j = i - 1;
			while (j >= 0 && _A[j] > tmp) {
				_A[j + 1] = _A[j];
				--j;
			}
			_A[j + 1] = tmp;
			print(_A);
			// System.out.println("i = " + i);
		}
		
	}
	
	// print method :: print array
	public static void print(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();
	}
	
}


public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);
	////////////////////////////////////
	int n = 0;
	int[] A;
	
	n = sc.nextInt();
	sc.nextLine();
	A = new int[n];
	for (int i = 0; i < n; ++i)
		A[i] = sc.nextInt();
	
	_insertionSort.print(A);
	_insertionSort.sort(A, n);
	
	////////////////////////////////////
	sc.close();
}

Compiler output:
Main.java:40: 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)
1 error
Language: Java

import java.util.Scanner;

class _insertionSort {
	
	// Default Constructor
	public void _insetrionSort() {
	}
	
	// sort method :: sort given array using insertion Sort
	public static void sort(int[] _A, int _n) {
		for (int i = 1; i < _n; ++i) {
			
			// print(_A);
			int tmp = _A[i];
			int j = i - 1;
			while (j >= 0 && _A[j] > tmp) {
				_A[j + 1] = _A[j];
				--j;
			}
			_A[j + 1] = tmp;
			print(_A);
			// System.out.println("i = " + i);
		}
		
	}
	
	// print method :: print array
	public static void print(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();
	}
	
}
public class ALDS1_01_A {
	
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		////////////////////////////////////
		int n = 0;
		int[] A;
		
		n = sc.nextInt();
		sc.nextLine();
		A = new int[n];
		for (int i = 0; i < n; ++i)
			A[i] = sc.nextInt();
		
		_insertionSort.print(A);
		_insertionSort.sort(A, n);
		
		////////////////////////////////////
		sc.close();
	}
	
}

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

import java.util.Scanner;

class _insertionSort {

        // Default Constructor
        public void _insetrionSort() {
        }

        // sort method :: sort given array using insertion Sort
        public static void sort(int[] _A, int _n) {
                for (int i = 1; i < _n; ++i) {

                        // print(_A);
                        int tmp = _A[i];
                        int j = i - 1;
                        while (j >= 0 && _A[j] > tmp) {
                                _A[j + 1] = _A[j];
                                --j;
                        }
                        _A[j + 1] = tmp;
                        print(_A);
                        // System.out.println("i = " + i);
                }

        }

        // print method :: print array
        public static void print(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();
        }

}
public class main {

        public static void main(String[] args) {
                Scanner sc = new Scanner(System.in);
                ////////////////////////////////////
                int n = 0;
                int[] A;

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

                _insertionSort.print(A);
                _insertionSort.sort(A, n);

                ////////////////////////////////////
                sc.close();
        }

}

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

import java.util.Scanner;

public class Main {
		// Default Constructor
	public void _insetrionSort() {
	}

	// sort method :: sort given array using insertion Sort
	public static void sort(int[] _A, int _n) {
		for (int i = 1; i < _n; ++i) {
			
			// print(_A);
			int tmp = _A[i];
			int j = i - 1;
			while (j >= 0 && _A[j] > tmp) {
				_A[j + 1] = _A[j];
				--j;
			}
			_A[j + 1] = tmp;
			print(_A);
			// System.out.println("i = " + i);
		}
		
	}
	
	// print method :: print array
	public static void print(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();
	}

	
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		////////////////////////////////////
		int n = 0;
		int[] A;
		
		n = sc.nextInt();
		sc.nextLine();
		A = new int[n];
		for (int i = 0; i < n; ++i)
			A[i] = sc.nextInt();
		
		_insertionSort.print(A);
		_insertionSort.sort(A, n);
		
		////////////////////////////////////
		sc.close();
	}
	
}

Compiler output:
Main.java:49: error: cannot find symbol
		_insertionSort.print(A);
		^
  symbol:   variable _insertionSort
  location: class Main
Main.java:50: error: cannot find symbol
		_insertionSort.sort(A, n);
		^
  symbol:   variable _insertionSort
  location: class Main
2 errors
Language: Java

import java.util.*;

public class InsertionSort {
    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();
        }
        toPrint(arr, n);

        for(int i = 1; i < n; 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;
            toPrint(arr, n);
        }

    }

    public static void toPrint(int[] arr, int n) {
        for(int i = 0; i < n; i++) {
            System.out.print(arr[i] + " ");
        }
        System.out.println();
    }
}

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

import java.util.Scanner;

public class Main{
    
    static void putArray(int[] array){
        System.out.print(array[i]);
        for(int i = 1; i < array.length; i++){
            System.out.print(" " + array[i]);
        }
        System.out.println();
    }
    
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int num = sc.nextInt();
        int[] array = new int[num];
        for(int i = 0; i < array; i++){
            array[i] = sc.nextInt();
        }
        
        putArray(array);
        
        for(int i = 1; i < array; 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;
            putArray(array);
        }
        
        
    }
}


Compiler output:
Main.java:6: error: cannot find symbol
        System.out.print(array[i]);
                               ^
  symbol:   variable i
  location: class Main
Main.java:17: error: bad operand types for binary operator '<'
        for(int i = 0; i < array; i++){
                         ^
  first type:  int
  second type: int[]
Main.java:23: error: bad operand types for binary operator '<'
        for(int i = 1; i < array; i++){
                         ^
  first type:  int
  second type: int[]
3 errors
Language: Java

import java.util.Scanner;

public class Main{
    
    static void putArray(int[] array){
        System.out.print(array[i]);
        for(int i = 1; i < array.length; i++){
            System.out.print(" " + array[i]);
        }
        System.out.println();
    }
    
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int num = sc.nextInt();
        int[] array = new int[num];
        for(int i = 0; i < array.length; i++){
            array[i] = sc.nextInt();
        }
        
        putArray(array);
        
        for(int i = 1; i < array.length; 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;
            putArray(array);
        }
        
        
    }
}


Compiler output:
Main.java:6: error: cannot find symbol
        System.out.print(array[i]);
                               ^
  symbol:   variable i
  location: class Main
1 error
Language: Java

import java.util.Scanner;

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int num = sc.nextInt();
        int[] array = new int[num];
        for(int i = 0; i < num; i++){
            array[i] = sc.nextInt();
        }
        for(int i = 1; i < num; i++){
            int v = a[i];
            int j = i - 1;
            while(j >= 0 && array[j] > v){
                array[j] = array[j + 1];
                j--;
            }
            array[j + 1] = v;
        }
    }
}


Compiler output:
Main.java:12: error: cannot find symbol
            int v = a[i];
                    ^
  symbol:   variable a
  location: class Main
1 error
Language: Java

import java.util.*;

class Main{
	public static void main(String[] args){
		Scanner sc = new Sccanner(System.in);
		int n = Integer.parseInt(sc.nextLine());
		String[] line=sc.nextLine().split(" ");
		int a = new int[n];
		for(int i=0;i<n;i++){
			a[i]=Integer.parseInt(line[i]);
		}
		insertionSort(a);
	}

	static int[] insertionSort(int[] a){
		for(int i=1;i<a.lenth-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;
			for(int j=0;j<a.length-1;i++){
				System.out.print(a[j]+" ");
			}
			System.outprintln(a[a.length-1]);
		}
		return a;
	}
}


Compiler output:
Main.java:5: error: cannot find symbol
		Scanner sc = new Sccanner(System.in);
		                 ^
  symbol:   class Sccanner
  location: class Main
Main.java:8: error: incompatible types: int[] cannot be converted to int
		int a = new int[n];
		        ^
Main.java:10: error: array required, but int found
			a[i]=Integer.parseInt(line[i]);
			 ^
Main.java:12: error: incompatible types: int cannot be converted to int[]
		insertionSort(a);
		              ^
Main.java:16: error: cannot find symbol
		for(int i=1;i<a.lenth-1;i++){
		               ^
  symbol:   variable lenth
  location: variable a of type int[]
Main.java:24: error: variable j is already defined in method insertionSort(int[])
			for(int j=0;j<a.length-1;i++){
			        ^
Main.java:27: error: cannot find symbol
			System.outprintln(a[a.length-1]);
			      ^
  symbol:   method outprintln(int)
  location: class System
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
7 errors
Language: Java

import java.util.*;

class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.nextLine());
		String[] line=sc.nextLine().split(" ");
		int a = new int[n];
		for(int i=0;i<n;i++){
			a[i]=Integer.parseInt(line[i]);
		}
		insertionSort(a);
	}

	static int[] insertionSort(int[] a){
		for(int i=1;i<a.lenth-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;
			for(int j=0;j<a.length-1;i++){
				System.out.print(a[j]+" ");
			}
			System.outprintln(a[a.length-1]);
		}
		return a;
	}
}


Compiler output:
Main.java:8: error: incompatible types: int[] cannot be converted to int
		int a = new int[n];
		        ^
Main.java:10: error: array required, but int found
			a[i]=Integer.parseInt(line[i]);
			 ^
Main.java:12: error: incompatible types: int cannot be converted to int[]
		insertionSort(a);
		              ^
Main.java:16: error: cannot find symbol
		for(int i=1;i<a.lenth-1;i++){
		               ^
  symbol:   variable lenth
  location: variable a of type int[]
Main.java:24: error: variable j is already defined in method insertionSort(int[])
			for(int j=0;j<a.length-1;i++){
			        ^
Main.java:27: error: cannot find symbol
			System.outprintln(a[a.length-1]);
			      ^
  symbol:   method outprintln(int)
  location: class System
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
6 errors
Language: Java

import java.util.*;

class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.nextLine());
		String[] line=sc.nextLine().split(" ");
		int[] a = new int[n];
		for(int i=0;i<n;i++){
			a[i]=Integer.parseInt(line[i]);
		}
		insertionSort(a);
	}

	static int[] insertionSort(int[] a){
		for(int i=1;i<a.lenth-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;
			for(int j=0;j<a.length-1;i++){
				System.out.print(a[j]+" ");
			}
			System.outprintln(a[a.length-1]);
		}
		return a;
	}
}


Compiler output:
Main.java:16: error: cannot find symbol
		for(int i=1;i<a.lenth-1;i++){
		               ^
  symbol:   variable lenth
  location: variable a of type int[]
Main.java:24: error: variable j is already defined in method insertionSort(int[])
			for(int j=0;j<a.length-1;i++){
			        ^
Main.java:27: error: cannot find symbol
			System.outprintln(a[a.length-1]);
			      ^
  symbol:   method outprintln(int)
  location: class System
3 errors
Language: Java

import java.util.*;

class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.nextLine());
		String[] line=sc.nextLine().split(" ");
		int[] a = new int[n];
		for(int i=0;i<n;i++){
			a[i]=Integer.parseInt(line[i]);
		}
		insertionSort(a);
	}

	static int[] insertionSort(int[] a){
		for(int i=1; i<a.lenth-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;
			for(int j=0;j<a.length-1;i++){
				System.out.print(a[j]+" ");
			}
			System.out.println(a[a.length-1]);
		}
		return a;
	}
}


Compiler output:
Main.java:16: error: cannot find symbol
		for(int i=1; i<a.lenth-1;i++){
		                ^
  symbol:   variable lenth
  location: variable a of type int[]
Main.java:24: error: variable j is already defined in method insertionSort(int[])
			for(int j=0;j<a.length-1;i++){
			        ^
2 errors
Language: Java

import java.util.*;

class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.nextLine());
		String[] line=sc.nextLine().split(" ");
		int[] a = new int[n];
		for(int i=0;i<n;i++){
			a[i]=Integer.parseInt(line[i]);
		}
		for(int i=1; i<a.lenth-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;
			for(int j=0;j<a.length-1;i++){
				System.out.print(a[j]+" ");
			}
			System.out.println(a[a.length-1]);
		}
	}
}


Compiler output:
Main.java:12: error: cannot find symbol
		for(int i=1; i<a.lenth-1;i++){
		                ^
  symbol:   variable lenth
  location: variable a of type int[]
Main.java:20: error: variable j is already defined in method main(String[])
			for(int j=0;j<a.length-1;i++){
			        ^
2 errors