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

import java.util.Scanner;
import java.util.Arrays;

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int[] a = new int[];
        for(int i = 0; i < 3; i++){
            a[i] = sc.nextInt();
        }
        
        Arrays.sort(a);
        
        for(int i = 0; i < a.length; i++){
            System.out.print(a[i] + " ");
        }
        
    }
}


Compiler output:
Main.java:7: error: array dimension missing
        int[] a = new int[];
                           ^
1 error
Language: Java

import java.util.Scanner;
import java.util.Arrays;

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int[] a = new int[3];
        for(int i = 0; i < 3; i++){
            a[i] = sc.nextInt();
        }
        
        Arrays.sort(a);
        
        for(int i = 0; i < a.length; i++){
            System.out.print(a[i]);
            if (i != a.length -1){
                System.out.print(" ")
            }else{
                System.out.println();
            }
        }
    }
}


Compiler output:
Main.java:17: error: ';' expected
                System.out.print(" ")
                                     ^
1 error
Language: Java

import java.util.Scanner;

public class Main{

public static sort(int a, int b, int c) {
int lowest;
int mid;
int highest;
if (a < b && a < c) {
lowest = a;
} else if (b < a && b < c) {
lowest = b;
} else {
lowest = c;
}if (a > b && a > c) {
highest = a;
} else if (b > a && b > c) {
highest = b;
} else {
highest = c;
}if ((a > b && a < c) || (a <b && a > c)) {
mid = a;
} else if ((b > a && b < c) || (b < a && b > c)) {
mid = b;
} else {
mid = c;
}
System.out.println(lowest + " " + mid + " " + highest);
} else if (
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int a = scan.nextInt();
int b = scan.nextInt();
int c = scan.nextInt();
sort(a, b, c);
}
}


Compiler output:
Main.java:5: error: invalid method declaration; return type required
public static sort(int a, int b, int c) {
              ^
Main.java:29: error: illegal start of type
} else if (
  ^
2 errors
Language: Java

import java.util.Scanner;

public class Main{

public static void sort(int a, int b, int c) {
int lowest;
int mid;
int highest;
if (a < b && a < c) {
lowest = a;
} else if (b < a && b < c) {
lowest = b;
} else {
lowest = c;
}if (a > b && a > c) {
highest = a;
} else if (b > a && b > c) {
highest = b;
} else {
highest = c;
}if ((a > b && a < c) || (a <b && a > c)) {
mid = a;
} else if ((b > a && b < c) || (b < a && b > c)) {
mid = b;
} else {
mid = c;
}
System.out.println(lowest + " " + mid + " " + highest);
} else if (
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int a = scan.nextInt();
int b = scan.nextInt();
int c = scan.nextInt();
sort(a, b, c);
}
}


Compiler output:
Main.java:29: error: illegal start of type
} else if (
  ^
1 error
Language: Java

import java.io.*;
 
public class Main {
    public static void main(String[] args)throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String input = br.readLine();
        String[] cut = input.split(" ");
        int noOne = Integer.parseInt(cut[0]);
        int noTwo = Integer.parseInt(cut[1]);
        int noThree = Integer.parseInt(cut[2]);
        
        
        if(noOne > noTwo || noTwo > noThree) {
            if(noOne > noTwo){
                int temp = noOne;
                noOne = noTwo;
                noTwo = temp;
            }
            if(noTwo > noThree){
                int temp = noTwo;
                noTwo = noThree;
                noThree = temp;
            }
            if(noOne > noTwo){
                int temp = noOne;
                noOne = noTwo;
                noTwo = temp;
            }
        }
        System.out.println(noOne + " " + noTwo + " " + noThree);
        
    }


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

import java.util.Scanner;

public class NumberSorting {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("Input:");
        Integer[] input = new Integer[3];
        input[0] = sc.nextInt();
        input[1] = sc.nextInt();
        input[2] = sc.nextInt();
        if((input[0] >= 1 && input[0] <= 10000) && (input[1] >= 1 && input[1] <= 10000) && (input[2] >= 1 && input[2] <= 10000)){
            if(input[1] < input[0]){
                int buffer = input[0];
                input[0] = input[1];
                input[1] = buffer;
            }
            if(input[2] < input[0]) {
                int buffer = input[0];
                input[0] = input[2];
                input[2] = buffer;
            }
            if(input[2] < input[1]){
                int buffer = input[1];
                input[1] = input[2];
                input[2] = buffer;
            }
            System.out.println("Output:");
            System.out.println(input[0] + " " + input[1] + " " + input[2]);
        }
        sc.close();
    }
}


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

import java.util.Scanner;

public class NumberSorting {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        Integer[] input = new Integer[3];
        input[0] = sc.nextInt();
        input[1] = sc.nextInt();
        input[2] = sc.nextInt();
        if((input[0] >= 1 && input[0] <= 10000) && (input[1] >= 1 && input[1] <= 10000) && (input[2] >= 1 && input[2] <= 10000)){
            if(input[1] < input[0]){
                int buffer = input[0];
                input[0] = input[1];
                input[1] = buffer;
            }
            if(input[2] < input[0]) {
                int buffer = input[0];
                input[0] = input[2];
                input[2] = buffer;
            }
            if(input[2] < input[1]){
                int buffer = input[1];
                input[1] = input[2];
                input[2] = buffer;
            }
        System.out.println(input[0] + " " + input[1] + " " + input[2]);
        }
    }
}


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

import java.util.Scanner;

public class Main3 {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		int tmp = 0;

		if( a > b ) {
			tmp = a;
			a = b;
			b = tmp;
		}

		if( b > c ) {
			tmp = b;
			b = c;
			c = tmp;
		}


		if( a > b ) {
			tmp = a;
			a = b;
			b = tmp;
		}

		System.out.println( a + " " + b + " " + c );
	}
}



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

import java.util.Scanner;

public class Sort3num {
    public static int[] sort3(int[] pre) {
        int tmp;
        for (int i = 2; i >= 0; i--) {
            for (int j = 0; j < i; j++) {
                if (pre[j] > pre[j + 1]) {
                    tmp  = pre[j];
                    pre[j] = pre[j + 1];
                    pre[j + 1] = tmp;
                }
            }
        }
        return pre;
    }

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

        num[0] = Integer.parseInt(scan.next());
        num[1] = Integer.parseInt(scan.next());
        num[2] = Integer.parseInt(scan.next());

        num = sort3(num);

        System.out.println(num[0] +" " + num[1] + " " + num[2]);
    }
}



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

import java.util.Scanner;

public class Sortnum {
    public static int[] sort3(int[] pre) {
        int tmp;
        for (int i = 2; i >= 0; i--) {
            for (int j = 0; j < i; j++) {
                if (pre[j] > pre[j + 1]) {
                    tmp  = pre[j];
                    pre[j] = pre[j + 1];
                    pre[j + 1] = tmp;
                }
            }
        }
        return pre;
    }

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

        num[0] = Integer.parseInt(scan.next());
        num[1] = Integer.parseInt(scan.next());
        num[2] = Integer.parseInt(scan.next());

        num = sort3(num);

        System.out.println(num[0] +" " + num[1] + " " + num[2]);
    }
}



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

import java.util.Scanner;
public class aizuJudge {
public static void main(String[] args) {
Scanner inp = new Scanner(System.in);
int a = inp.nextInt();
int b = inp.nextInt();
int c = inp.nextInt();
int d;
 
if (a>c){
d = c;
c = a;
a = d;
}
if (b>c){
d = c;
c = b;
b = d;
}
if (a>b){
d = a;
a = b;
b = d;
}
 
System.out.println(a+" "+b+" "+c);
}
}


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

import java.util.Scanner;

public Main {

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

        int a = scan.nextInt();
        int b = scan.nextInt();
        int c = scan.nextInt();

        int[] array = { a, b, c };

        for (int i : array) {
            if (i < 1 || i > 10000) {
                System.exit(0);
            }
        }

        int stock = 0;

        if (array[0] > array[1]) {
            stock = array[0];
            array[0] = array[1];
            array[1] = stock;
        }

        if (array[1] > array[2]) {
            stock = array[1];
            array[1] = array[2];
            array[2] = stock;
        }

        if (array[0] > array[1]) {
            stock = array[0];
            array[0] = array[1];
            array[1] = stock;
        }

        print(array[0], array[1], array[2]);

        scan.close();
    }

    public static void print(int one, int tow, int three) {
        System.out.printf("%d %d %d", one, tow, three);
    }

}



Compiler output:
Main.java:3: error: class, interface, enum, or record expected
public Main {
       ^
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:49: error: class, interface, enum, or record expected
}
^
3 errors
Language: Java

import java.util.Scanner;

class Main{

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

int[] buf=new int[3];

for(int i=0;i<buf.length;i++){
    buf[i]=sc.nextInt();
}

int work;
for(int i=0;i<buf.length;i++){
   for(int j=0;j<buf.length-i-1;j++){
       if(buf[j]>buf[j+1]){
            work=buf[j];
            buf[j]=buf[j+1];
            buf[j+1]=work;
       }
   }
}


System.out.print(buf[0]+" "+buf[1]+" "+buf[2]+\n);

sc.close();
}

}


Compiler output:
Main.java:26: error: illegal character: '\'
System.out.print(buf[0]+" "+buf[1]+" "+buf[2]+\n);
                                              ^
Main.java:26: error: not a statement
System.out.print(buf[0]+" "+buf[1]+" "+buf[2]+\n);
                                               ^
Main.java:26: error: ';' expected
System.out.print(buf[0]+" "+buf[1]+" "+buf[2]+\n);
                                                ^
3 errors
Language: Java

import java.util.Scanner;

class Main{

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

int[] buf=new int[3];

for(int i=0;i<buf.length;i++){
    buf[i]=sc.nextInt();
}

int work;
for(int i=0;i<buf.length;i++){
   for(int j=0;j<buf.length-i-1;j++){
       if(buf[j]>buf[j+1]){
            work=buf[j];
            buf[j]=buf[j+1];
            buf[j+1]=work;
       }
   }
}


System.out.printf(buf[0]+" "+buf[1]+" "+buf[2]+\n);

sc.close();
}

}


Compiler output:
Main.java:26: error: illegal character: '\'
System.out.printf(buf[0]+" "+buf[1]+" "+buf[2]+\n);
                                               ^
Main.java:26: error: not a statement
System.out.printf(buf[0]+" "+buf[1]+" "+buf[2]+\n);
                                                ^
Main.java:26: error: ';' expected
System.out.printf(buf[0]+" "+buf[1]+" "+buf[2]+\n);
                                                 ^
3 errors
Language: Java

import java.util.Arrays;
import java.util.Scanner;

public class SortingThreeNumbers {
	public static void main (String[] args) throws java.lang.Exception
	 {
		Scanner scan = new Scanner(System.in);



		int [] su  = new int[3];
		su[0] = scan.nextInt();
		su[1] = scan.nextInt();
		su[2] = scan.nextInt();
		Arrays.sort(su);
		System.out.println(Arrays.toString(su));
		scan.close();
	 }

}


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

import java.util.Arrays;
import java.util.Scanner;

public class SortingThreeNumbers {
	public static void main (String[] args) throws java.lang.Exception
	 {
		Scanner scan = new Scanner(System.in);



		int [] su  = new int[3];
		su[0] = (int)scan.nextInt();
		su[1] = (int)scan.nextInt();
		su[2] = (int)scan.nextInt();
		Arrays.sort(su);
		for (int i = 0; i < su.length ; i++) {
			System.out.print(su[i]);
			System.out.print(" ");
		}
		scan.close();
	 }

}



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

import java.util.Arrays;
import java.util.Scanner;

public class SortingThreeNumbers {
	public static void main (String[] args) throws java.lang.Exception
	 {
		Scanner scan = new Scanner(System.in);



		int [] su  = new int[3];
		su[0] = (int)scan.nextInt();
		su[1] = (int)scan.nextInt();
		su[2] = (int)scan.nextInt();
		Arrays.sort(su);
		for (int i = 0; i < su.length ; i++) {
			System.out.print(su[i]);

			if( i >= su.length - 1) {
				break;
			}
			System.out.print(" ");

		}
			
		scan.close();
	 }

}

}



Compiler output:
Main.java:31: error: class, interface, enum, or record expected
}
^
1 error
Language: Java

import java.util.Scanner;
public class Main {
public static void main(String[] args) {

Scanner sc = new Scanner(System.in);

int a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
if (a < b) {
    if (b < c){ System.out.printf("%d %d %d", a, b, c);}
    else if (a < c) {System.out.printf("%d %d %d", a, c, b);}
    else {System.out.printf("%d %d %d", c, a, b);}
}
else{
        if(a<c){System.out.printf("%d %d %d", b, a, c);}
    else if(b<c){System.out.printf("%d %d %d", b, c, a);}
        else {System.out.printf("%d %d %d", c, b, a);
} 
}
}


Compiler output:
Main.java:21: 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);
// 3つの文字の固まりをそれぞれ整数値と想定して読み込む
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        if (a < b) {
            if (b < c) {
                System.out.printf("%d %d %d¥n", a, b, c);
            } else if (a < c) { // ... 以降を書き足そう！
                System.out.printf("%d %d %d¥n", a, c, b);
            } else {
                System.out.printf("%d %d %d¥n", c, a, b);
            }
        } else { // ... 以降を書き足そう！
            if (a < c) {
                System.out.printf("%d %d %d¥n", b, a, c);
            }else if(b < c){
                System.out.printf("%d %d %d¥n", b, c, a);
            }else{
                System.out.printf("%d %d %d¥n", c, b, a);
            }
    }
}


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 main(String[]args){

Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
if(a<b){
    if(b < c){
System.out.printf("%d %d %d\n",a,b,c );
} 
else{if(a>c){
    System.out.printf("%d %d %d\n",c,a,b);
}
}
else{
    if(a < c){
        System.out.printf("%d %d %d\n",b,a,c );
        } 
        else{if(b>c){
} else{
    System.out.printf("%d %d %d\n",a,c,b);
}
            System.out.printf("%d %d %d\n",c,b,a);
        } else{
            System.out.printf("%d %d %d\n",b,c,a);
        }
        }
}
}
}




Compiler output:
Main.java:26: error: 'else' without 'if'
        } else{
          ^
Main.java:17: error: 'else' without 'if'
else{
^
2 errors
Language: Java

import java.util.Scanner;

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);;
        int a = sc.nextInt(), b = sc.nextInt(), c = sc.nextInt();
        if(a>b) {
            if (b > c) {
                System.out.println(a + " " + b + " " + c);
            } else if (a>c) {
                System.out.println(a + " " + c + " " + b);
            }else{
                System.out.println(c + " " + a + " " + b);

            }
        }else if(a>c){
            System.out.println(b + " " + a + " " + c);
        }else if(b>c) {
            System.out.println(b + " " + c + " " + a);
        }  else{
            System.out.println(c + " " + b + " " + a);


        }
    }



Compiler output:
Main.java:25: 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[] box;
        box = new int[3];

        for(int i=0; i<3; i++)
            box[i] = sc.nextInt();

        for(int i=0; i<3; i++)
        {
            for(int j=i+1; j<3; j++){
                if (box[i]>box[j])
                {
                    int temp;
                    temp = box[i];
                    box[i]=box[j];
                    box[j]=temp;
                }
            }
        }

        for(int i=0; i<3; i++)
        {
            System.out.print(box[i]);
            System.out.printf(" ");
        }


    }


Compiler output:
Main.java:32: 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 a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
if(a<b){
    if(b < c){
System.out.printf("%d %d %d\n",a,b,c );
} 
else{if(a>c){
    System.out.printf("%d %d %d\n",c,a,b);
}
}
else{
    if(a < c){
        System.out.printf("%d %d %d\n",b,a,c );
        } 
        else{if(b>c){
} else{
    System.out.printf("%d %d %d\n",a,c,b);
}
            System.out.printf("%d %d %d\n",c,b,a);
        } else{
            System.out.printf("%d %d %d\n",b,c,a);
        }
        }
}
}
}




Compiler output:
Main.java:26: error: 'else' without 'if'
        } else{
          ^
Main.java:17: error: 'else' without 'if'
else{
^
2 errors
Language: Java

import java.util.Scanner;

public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);;
        int a = sc.nextInt(), b = sc.nextInt(), c = sc.nextInt();
        if(a>b) {
            if (b > c) {
                System.out.println(c + " " + b + " " + a);
            } else if (a>c) {
                System.out.println(b + " " + c + " " + a);
            }else{
                System.out.println(b + " " + a + " " + c);

            }
        }else if(a>c){
            System.out.println(c + " " + a + " " + b);
        }else if(b>c) {
            System.out.println(a + " " + c + " " + b);
        }  else{
            System.out.println(a + " " + b + " " + c);


        }
    }


Compiler output:
Main.java:25: 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 scanner = new Scanner(System.in);

    int a = scanner.nextInt();
    int b = scanner.nextInt();
    int c = scanner.nextInt();

    if (a<=b) {
      if (b<=c) System.out.printf("%d %d %d\n", a, b, c);
      else if (a<=c) System.out.printf("%d %d %d\n", a, c, b);
      else Syttem.out.printf("%d %d %d\n", c, a, b);
    } else {
      if (a<=c) System.out.printf("%d %d %d\n", b, a, c);
      else if (c<=b) System.out.printf("%d %d %d\n", c, b, a);
      else System.out.printf("%d %d %d\n", b, c, a);
    }
  }
}


Compiler output:
Main.java:14: error: package Syttem does not exist
      else Syttem.out.printf("%d %d %d\n", c, a, b);
                 ^
1 error
Language: Java

import java.util.Scanner;

public class Main22 {
    public static void main(String[]args){
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        if(a<b){
            if(b<c){
                System.out.printf("%d %d %d¥n",a,b,c);
            }else if(a<c){
                System.out.printf("%d %d %d¥n",a,c,b);
            }else{
                System.out.printf("%d %d %d¥n",c,a,b);
            }
        }else{
            if(a<c){
                System.out.printf("%d %d %d¥n",b,a,c);
            }else if(b<c){
                System.out.printf("%d %d %d¥n",b,c,a);
            }else{
                System.out.printf("%d %d %d¥n",c,b,a);
            }
        }
    }
}



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

import java.util.Scanner;
public class STN{
public static void main(String[]args){

Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
if(a<b){
    if(b < c){
                 System.out.printf("%d %d %d\n",a,b,c );
              }  
    else{if(a>c){
                 System.out.printf("%d %d %d\n",c,a,b);
                 } 
         else{
                 System.out.printf("%d %d %d\n",a,c,b);
              }
        }
else{
    if(a < c){
                  System.out.printf("%d %d %d\n",b,a,c );
              } 
     else{if(b>c){
                  System.out.printf("%d %d %d\n",c,b,a);
                  } 
        else{
                  System.out.printf("%d %d %d\n",b,c,a);
             }
         }
     }
}
}






Compiler output:
Main.java:20: error: 'else' without 'if'
else{
^
Main.java:33: error: reached end of file while parsing
}
 ^
2 errors
Language: Java

import java.util.Scanner;
public class Main{
public static void main(String[]args){

Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
if(a<b){
    if(b < c){
                 System.out.printf("%d %d %d\n",a,b,c );
              }  
    else{if(a>c){
                 System.out.printf("%d %d %d\n",c,a,b);
                 } 
         else{
                 System.out.printf("%d %d %d\n",a,c,b);
              }
        }
else{
    if(a < c){
                  System.out.printf("%d %d %d\n",b,a,c );
              } 
     else{if(b>c){
                  System.out.printf("%d %d %d\n",c,b,a);
                  } 
        else{
                  System.out.printf("%d %d %d\n",b,c,a);
             }
         }
     }
}
}






Compiler output:
Main.java:20: error: 'else' without 'if'
else{
^
Main.java:33: error: reached end of file while parsing
}
 ^
2 errors
Language: Java

import java.util.*;

public class Main{
  public static void main (String[] args){
    Scanner sc = new Scanner(System.in);
    int[] n = new int[3];
    n[0] = sc.nextInt();
    n[1] = sc.nextInt();
    n[2] = sc.nextInt();
    int min = min(n[0],n[1],n[2]);
    int max = min(-n[0],-n[1],-n[2]);
    int i;
    for(i = 0;i < n.length;i++){
      if(i != min && i != max)break;
    }
    System.out.println(n[min] + " " + n[i] + " " + n[max]);
}
public static int min (int a, int b, int c){
  int m  = -1;
  if (a <= b && a <= c){
    return 0;
  }else if (b <= a && b <= c){
    return 1;
  }else{
    return 2;
  }
}


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

import java.util.Scanner;
public class STN{
public static void main(String[]args){

Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
if(a<b){
    if(b < c){
                 System.out.printf("%d %d %d\n",a,b,c );
              }  
    else{if(a>c){
                 System.out.printf("%d %d %d\n",c,a,b);
                 } 
         else{
                 System.out.printf("%d %d %d\n",a,c,b);
              }
        }
        }   
else{
    if(a < c){
                  System.out.printf("%d %d %d\n",b,a,c );
              } 
     else{if(b>c){
                  System.out.printf("%d %d %d\n",c,b,a);
                  } 
        else{
                  System.out.printf("%d %d %d\n",b,c,a);
             }
         }
     }
}
}






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

import java.util.Scanner;

public class Main{
    public static void main(String[] args{
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        if(a<b){
            if(b<c){
                System.out.printf("%d %d %d¥n",a,b,c);
            }else{
                if(a<c){
                    System.out.printf("%d %d %d¥n",a,c,b);
                }else{
                    System.out.printf("%d %d %d¥n",c,a,b);
                }
            }
        }else{
            if(a<c){
                System.out.printf("%d %d %d¥n",b,a,c);
            }else{
                if (b<c){
                    System.out.printf("%d %d %d¥n",b,c,a);
                }else{
                    System.out.printf("%d %d %d¥n",c,b,a);
                }
            }
        }
    }
}


Compiler output:
Main.java:4: error: ',', ')', or '[' expected
    public static void main(String[] args{
                                         ^
1 error
Language: Java

import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// 標準入力からデータを読み込む準備
Scanner sc = new Scanner(System.in);
// 3つの文字の固まりをそれぞれ整数値と想定して読み込む int a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
if (a < b) {
if (b < c) {
System.out.printf("%d %d %d¥n", a, b, c);
} else if (a < c) {
System.out.printf("%d %d %d¥n", a, c, b);
}else{
System.out.printf("%d %d %d¥n", c, a, b);
}} else { 
if(a < c){
System.out.printf("%d %d %d¥n", b, a, c);
} else if (b < c) {
System.out.printf("%d %d %d¥n", b, c, a);
}else{
System.out.printf("%d %d %d¥n", c, b, a);
} }


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

import java.util.Scanner;

public class Controller {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        if(a < b) {
            if(b < c) System.out.printf("%d %d %d\n", a, b, c);
            else if(a < c) System.out.printf("%d %d %d\n", a, c, b);
            else System.out.printf("%d %d %d\n", c, a, b);
        } else {
            if (a < c) System.out.printf("%d %d %d\n", b, a, c);
            else if(b < c) System.out.printf("%d %d %d\n", b, c, a);
            else System.out.printf("%d %d %d", c, b, a);
        }
    }
}


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

import java.util.Scanner;

public class Controller {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        if(a < b) {
            if(b < c) System.out.printf("%d %d %d\n", a, b, c);
            else if(a < c) System.out.printf("%d %d %d\n", a, c, b);
            else System.out.printf("%d %d %d\n", c, a, b);
        } else {
            if (a < c) System.out.printf("%d %d %d\n", b, a, c);
            else if(b < c) System.out.printf("%d %d %d\n", b, c, a);
            else System.out.printf("%d %d %d\n", c, b, a);
        }
    }
}


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

import java.util.Scanner;

public class three{
	public static void main(String[]args){
	Scanner sc = new Scanner(System.in);
	int x = sc.nextInt();
	int y = sc.nextInt();
	int z = sc.nextInt();
	  if(x < y){
	if(y < z){
	System.out.printf("%d %d %d\n",x,y,z);	
	}
	else if(x < z){
	System.out.printf("%d %d %d\n",x,z,y);	
	}
	else{
	System.out.printf("%d %d %d\n",z,x,y);	
	}
	}
	  if(x > y){
	if(x < z){
	System.out.printf("%d %d %d\n",y,x,z);	
	}
	else if(y < z){
	System.out.printf("%d %d %d\n",y,z,x);	
	}
	else{
	System.out.printf("%d %d %d\n",z,y,x);	
	}
}
}
}


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



import java.util.Scanner;
public class Main{
        public static void main(String[] args) {
// 標準入力からデータを読み込む準備
            Scanner sc = new Scanner(System.in);
// 3つの文字の固まりをそれぞれ整数値と想定して読み込む
            int a = sc.nextInt();
            int b = sc.nextInt();
            int c = sc.nextInt();
            if (a < b) {
                if (b < c) {
                    System.out.printf("%d %d %d¥n", a, b, c);
                } else if (c < b) {
                    System.out.printf("%d %d %d\n", c, a, b);
                } else {
                    System.out.printf("%d %d %d\n", a, c, b);
                }
            } else if (b < a) {
                if (c < b) {
                    System.out.printf("%d %d %d\n", c, b, a);
                } else if (a < c) {
                    System.out.printf("%d %d %d\n", b, a, c);
                } else {
                    System.out.printf("%d %d %d\n", b, c, a);
                }
            }
        }
    


Compiler output:
Main.java:29: 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 a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        if (a < b) {
            if (b < c) {
                System.out.printf("%d %d %d\n", a, b, c);
            } else {
            if (a < c) {
                    System.out.printf("%d %d %d\n", a, c, b);
                }
            }
        } else if (c < a) {
            if (b < c) {
                System.out.printf("%d %d %d\n", b, c, a);
            } else {
                if (a < b) {
                    System.out.printf("%d %d %d\n", c, a, b);
                }
            }
        } else {if (b < a) {
            if (a < c) {
                System.out.printf("%d %d %d\n", b, a, c);
            } else {
                if (c < a) {
                    System.out.printf("%d %d %d\n", c, b, a);
                }
            }
        }
    }
}



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

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        if(a < b) {
            if(b < c) {
                System.out.printf("%d %d %d\n", a, b, c);
            } else if(a < c) {
                System.out.printf("%d %d %d\n", a, c, b);
            } else {
                System.out.printf("%d %d %d\n", c, a, b);
            }
        } else if(b < c) {
            if(a < c) {
                System.out.printf("%d %d %d\n", b, a, c);
            } else {
                System.out.printf("%d %d %d\n", b, c, a);
            }
        } else {
            System.out.printf("%d %d %d\n", c, b, a);
        }
    }
}



Compiler output:
Main.java:3: error: cannot find symbol
        Scanner sc = new Scanner(System.in);
        ^
  symbol:   class Scanner
  location: class Main
Main.java:3: 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 Main{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int a = scan.nextInt();
        int b = scan.nextInt();
        int c = scan.nextInt();
        do {
        if (a>b){
            int d = b;
            b = a;
            a = d;
        }
        if (b>c){
            int d = c;
            c = b;
            b = d;
        }
        }while(a<b<c);
        System.out.printf("%d %d %d", a, b, c);
        scan.close();
    }
}


Compiler output:
Main.java:20: error: bad operand types for binary operator '<'
        }while(a<b<c);
                  ^
  first type:  boolean
  second type: int
1 error
Language: Java

import java.util.Scanner;

public class Main{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int a = scan.nextInt();
        int b = scan.nextInt();
        int c = scan.nextInt();
        do {
        if (a>b){
            int d = b;
            b = a;
            a = d;
        }
        if (b>c){
            int d = c;
            c = b;
            b = d;
        }
        }while(a<=b<=c);
        System.out.printf("%d %d %d", a, b, c);
        scan.close();
    }
}


Compiler output:
Main.java:20: error: bad operand types for binary operator '<='
        }while(a<=b<=c);
                   ^
  first type:  boolean
  second type: int
1 error
Language: Java

import java.util.Scanner;

public class Main{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int a = scan.nextInt();
        int b = scan.nextInt();
        int c = scan.nextInt();
        while(!a<=b && !b<=c){
        if (a>b){
            int d = b;
            b = a;
            a = d;
        }
        if (b>c){
            int d = c;
            c = b;
            b = d;
        }
        }
        System.out.printf("%d %d %d", a, b, c);
        scan.close();
    }
}


Compiler output:
Main.java:9: error: bad operand type int for unary operator '!'
        while(!a<=b && !b<=c){
              ^
Main.java:9: error: bad operand type int for unary operator '!'
        while(!a<=b && !b<=c){
                       ^
2 errors
Language: Java

import java.util.Scanner;

public class sortthree{
    public static void main(String[]args){
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        if(a<b){
            if(b<c){
                System.out.println(a+" "+b+" "+c);
            }else if(c<b){
                if(a<c){
                    System.out.println(a+" "+c+" "+b);
                }else{
                    System.out.println(c+" "+a+" "+b);
                }
            }
        }else if(b<a){
            if(a<c){
                System.out.println(b+" "+a+" "+c);
            }else if(c<a){
                if(b<c){
                    System.out.println(b+" "+c+" "+a);
                }else if(c<b){
                    System.out.println(c+" "+b+" "+a);
                }
            }
        }

    }
}


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

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String str1 = sc.next();
		String str2 = sc.next();
		String str3 = sc.next();
		int[] intArray = new int[3];
		intArray[0] = Integer.parseInt(str1);
		intArray[1] = Integer.parseInt(str2);
		intArray[2] = Integer.parseInt(str3);

		for (int i = 0; i < intArray.length - 1; i++) {
			for (int j = i + 1; j < intArray.length; j++) {
				if (intArray[i] > intArray[j]) {
					int tmp = intArray[i];
					intArray[i] = intArray[j];
					intArray[j] = tmp;
				}
			}
		}
		System.out.println(intArray[0] + " " + intArray[1] + " " + intArray[2]);
	}
}


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 Main {public static void main(String[] args) {Scanner sc = new Scanner(System.in);String str1 = sc.next();String str2 = sc.next();String str3 = sc.next();int[] intArray = new int[3];intArray[0] = Integer.parseInt(str1);intArray[1] = Integer.parseInt(str2);	intArray[2] = Integer.parseInt(str3);for (int i = 0; i < intArray.length - 1; i++) {
for (int j = i + 1; j < intArray.length; j++) {if (intArray[i] > intArray[j]) {int tmp = Array[i];intArray[i] = intArray[j];intArray[j] = tmp;}}}System.out.println(intArray[0] + " " + intArray[1] + " " + intArray[2]);}}


Compiler output:
Main.java:4: error: cannot find symbol
for (int j = i + 1; j < intArray.length; j++) {if (intArray[i] > intArray[j]) {int tmp = Array[i];intArray[i] = intArray[j];intArray[j] = tmp;}}}System.out.println(intArray[0] + " " + intArray[1] + " " + intArray[2]);}}
                                                                                         ^
  symbol:   variable Array
  location: class Main
1 error
Language: Java

import java.util.Scanner;

public class Ex3 {
	public static void main(String[] args){
Scanner sc = new Scanner(System.in);
	
	int a =sc.nextInt();
	int b =sc.nextInt();
	int c =sc.nextInt();
	int i, j, tmp;
	int[] data={a,b,c};

	

	for(i=0; i<2; i++)
	for(j=i+1; j<3; j++)
	if(data[i] > data[j]){
	tmp=data[i];
	data[i]=data[j];
	data[j]=tmp;
	}

	for(i=0; i<3; i++) System.out.print(data[i] + " ");
	System.out.println();
	}

	
}



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

import java.util.Scanner;

public class Main {
	public static void main(String[] args){
Scanner sc = new Scanner(System.in);
	
	int a =sc.nextInt();int b =sc.nextInt();int c =sc.nextInt();
	int i, j, tmp;
	int[] data={a,b,c};

	

	for(i=0; i<2; i++)
	for(j=i+1; j<3; j++)
	if(data[i] > data[j]){
	tmp=data[i];
	data[i]=data[j];
	data[j]=tmp;
	}

	for(i=0; i<3; i++) System.out.print(data[i] + " ");
	System.out.println();
	}



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

public static void main(String[] args) {
	Scanner scn = new Scanner(System.in);
int[] x = new int[3];
for(int i = 0; i < 3; i++){
x[i] = scn.nextInt();
}
Arrays.sort(x);
System.out.println(x[0]+" "+x[1]+" "+x[2]);
}
}


Compiler output:
Main.java:1: 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:10: error: class, interface, enum, or record expected
}
^
2 errors
Language: Java

import java.io.*;

public class Main {
    public static void main (String[] args) throws java.lang.Exception {
    
    BufferedReader input = new BufferedReader (new InputStreamReader(System.in));
    String A   = input.readLine();
    BufferedReader input = new BufferedReader (new InputStreamReader(System.in));
    String B   = input.readLine();
    BufferedReader input = new BufferedReader (new InputStreamReader(System.in));
    String C   = input.readLine();
    
    int aa = Integer.parseInt(A);
    int bb = Integer.parseInt(B);
    int cc = Integer.parseInt(C);
    
    int[] output = new int[]{aa, bb, cc};
    for(int i = 0; i < output.length; i++)
    System.out.println(output[i]);
    
    }
}


Compiler output:
Main.java:8: error: variable input is already defined in method main(String[])
    BufferedReader input = new BufferedReader (new InputStreamReader(System.in));
                   ^
Main.java:10: error: variable input is already defined in method main(String[])
    BufferedReader input = new BufferedReader (new InputStreamReader(System.in));
                   ^
2 errors
Language: Java

import java.io.*;

public class Menseki {
	public static void main(String[] args) {
		String line;
		int a,b,c;
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		try {
			System.out.println("input a:");
			line = reader.readLine();
			a = Integer.parseInt(line);
			System.out.println("input b:");
			line = reader.readLine();
			b = Integer.parseInt(line);
			System.out.println("input c:");
			line = reader.readLine();
			c = Integer.parseInt(line);
			if(a>b && a>c && b>c) {
				System.out.println(c+" "+b+" "+a);
			}else if(a>b && a>c && b<c){
				System.out.println(b+" "+c+" "+a);
			}else if(b>a && b>c && a>c){
				System.out.println(c+" "+a+" "+b);
			}else if(b>a && b>c && c>a){
				System.out.println(a+" "+c+" "+b);
			}else if(c>a && c>b && a>b){
				System.out.println(a+" "+b+" "+c);
			}else if(c>a && c>b && b>a){
				System.out.println(b+" "+a+" "+c);
			}
		}catch(NumberFormatException e) {
			System.out.println(e);
		}catch(IOException e) {
			System.out.println(e);
		}
	}
}


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

import java.util.Arrays;
import java.util.Scanner;

public class ITP1_2_C {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        sc.close();

        int[] nums = new int[] {a, b, c};

        Arrays.sort(nums);


        	System.out.printf("%d %d %d\n",nums[0], nums[1], nums[2]);


	}

}



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

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
        int i;
        int s[] = new int[3];
        
        for(i=0;i<3;i++){
            s[i] = sc.nextInt();
        }
        Arrays.sort(s);
        for(i=0;i<3;i++){
            System.out.print(s[i]);
            if(i==2){
                System.out.println();
                break;
            }
            System.out.print(' ');
        }
        
        sc.close();

	}

}


Compiler output:
Main.java:14: error: cannot find symbol
        Arrays.sort(s);
        ^
  symbol:   variable Arrays
  location: class Main
1 error
Language: Java

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

public class Three {
    public static void main(String[] args) throws IOException {
        // Here your code !
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] Data = br.readLine().split(" ");
        int a = Integer.parseInt(Data[0]);
        int b = Integer.parseInt(Data[1]);
        int c = Integer.parseInt(Data[2]);
        if (a > b) {
            int temp = a;
            a = b;
            b = temp;
        }
        if (b > c) {
            int temp = b;
            b = c;
            c = temp;
        }
        if (a > b) {
            int temp = a;
            a = b;
            b = temp;
        }
        System.out.println( a +" "+ b +" "+ c );
    }
}



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

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

		String a_str = scanner.next();
		String b_str = scanner.next();
		String c_str = scanner.next();

		int a = Integer.parseInt(a_str);
		int b = Integer.parseInt(b_str);
		int c = Integer.parseInt(c_str);

		if(b < a) {
			int tmp = b;
			b = a;
			a = tmp;
		}

		if(c < b) {
			int tmp = c;
			c = b;
			b = tmp;
		}

		System.out.println(a + " " + b + " " + c);

    	scanner.close();
    }
}


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

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		if(a<b) {
			if(b<c) {
				System.out.printf("%d %d %d\n",a,b,c);
			}else if(a<c) {
				System.out.printf("%d %d %d\n",a,c,b);				
			}else if(c<a) {
				System.out.printf("%d %d %d\n",c,a,b);
				
			}
		}else if(b>c) {
			System.out.printf("%d %d %d\n",c,b,a);
		}else if(a<c) {
			System.out.printf("%d %d %d\n",b,a,c);
		}else {
			System.out.printf("%d %d %d\n",b,c,a);
		}
		sc.close();

	}


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

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

public class Main {

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        List<Integer> list = new ArrayList<>();
        for (int i = 0; i < 3; i++) {
            list.add(scan.nextInt());
        }
           
        
        for (int i = 0; i < (list.size() - 1); i++) {
            for (int j = (list.size() - 1); j > i; j--) {
                if(list.get(j-1) > list.get(j)){
                    int tmp = list.get(j-1);
                    list.set(j-1,list.get(j));
                    list.set(j, tmp);
                }
            }
        }
        for (Integer array : list) {
            System.out.print(array + " ");
        }
        

    }

}



Compiler output:
Main.java:1: error: class, interface, enum, or record expected
mport java.util.ArrayList;
^
Main.java:2: error: class, interface, enum, or record expected
import java.util.List;
^
Main.java:3: error: class, interface, enum, or record expected
import java.util.Scanner;
^
3 errors
Language: Java

import java.util.Scanner;

public class Sort {

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int array[] = new int[3];
        for (int i = 0; i < 3; i++) {
            array[i] = scan.nextInt();
        }
           
        
        for (int i = 0; i < (3 - 1); i++) {
            for (int j = (3 - 1); j > i; j--) {
                if(array[j-1] > array[j]){
                    int tmp = array[j-1];
                    array[j-1] = array[j];
                    array[j] = tmp;
                }
            }
        }
        for (int i = 0;i < 3; i++) {
            System.out.print(array[i] + " ");
        }
        

    }

}
 


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

import java.util.*;

class Main{
    public static void main(String[] args){
        Scanner reader = new Scanner(System.in);
        Int[] num = {reader.nextInt(), reader.nextInt(), reader.nextInt()};
        Arrays.sort(num);
        
        System.out.println(num[0] + " " + num[1] + " " + num[2]);
    }
}


Compiler output:
Main.java:6: error: cannot find symbol
        Int[] num = {reader.nextInt(), reader.nextInt(), reader.nextInt()};
        ^
  symbol:   class Int
  location: class Main
1 error