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

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

public class PrintTestCases {
	

	public static void main(String[] args) throws NumberFormatException, IOException {
		// TODO 自動生成されたメソッド・スタブ
		 InputStreamReader is = new InputStreamReader(System.in);
		 BufferedReader br = new BufferedReader(is);
		 int count = 1;
		 int input = Integer.parseInt(br.readLine());
		 while (input != 0) {
			 System.out.println("Case"+" "+count+": "+input);
			 input = Integer.parseInt(br.readLine());
			 count++;
		 }
		
	
	}

}


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

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

public class Main {
 

 public static void main(String[] args) throws NumberFormatException, IOException {
  // TODO 自動生成されたメソッド・スタブ
   InputStreamReader is = new InputStreamReader(System.in);
   BufferedReader br = new BufferedReader(is);
   int count = 1;
   int input = Integer.parseInt(br.readLine());
   while (input != 0) {
    System.out.println("Case"+" "+count+": "+input);
    input = Integer.parseInt(br.readLine());
    count++;
   }
  
 
 }


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) {
		boolean hantei = false;
		int x = 0;
		int y = 0;
		while (hantei != true ) {
			Scanner scan = new Scanner(System.in);
			x = scan.nextInt();
			y = scan.nextInt();
			if (x == 0 && y ==0) {
				hantei = true;
			}else{
				if (x > y) {
					System.out.println(y+" "+x);
				}else {
					System.out.println(x+" "+y);
				}
			}
		}
	


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

public class Main {
	
	public static void main(String[] args) {
		int x, y, temp;
	      System.out.println("Enter x and y");
	      Scanner in = new Scanner(System.in);
	 
	      x = in.nextInt();
	      y = in.nextInt();
	 
	      System.out.println("Before Swapping\nx = "+x+"\ny = "+y);
	 
	      temp = x;
	      x = y;
	      y = temp;
	 
	      System.out.println("After Swapping\nx = "+x+"\ny = "+y);
    }

}


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

public class Main {
	
	public static void main(String[] args) {
		@SuppressWarnings("resource")
		Scanner Scanner = new Scanner(System.in);
        List<Integer> list = new ArrayList<>();

        while (Scanner.hasNext()) {
            int input = Integer.parseInt(Scanner.next());
            if (input == 0) {
                break;
            }
            list.add(input);
        }

        IntStream.range(0, list.size())
                .forEach(i -> System.out.println("Case" + " " + (i + 1) + ": " + list.get(i)));
    }

}


Compiler output:
Main.java:5: error: cannot find symbol
		Scanner Scanner = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:5: error: cannot find symbol
		Scanner Scanner = new Scanner(System.in);
		                      ^
  symbol:   class Scanner
  location: class Main
Main.java:6: error: cannot find symbol
        List<Integer> list = new ArrayList<>();
        ^
  symbol:   class List
  location: class Main
Main.java:6: error: cannot find symbol
        List<Integer> list = new ArrayList<>();
                                 ^
  symbol:   class ArrayList
  location: class Main
Main.java:16: error: cannot find symbol
        IntStream.range(0, list.size())
        ^
  symbol:   variable IntStream
  location: class Main
5 errors
Language: Java

import java.io.*;
import java.util.StringTokenizer;


public class Main {

    public static void main(String[] args) throws Exception {
        FastScanner scanner = new FastScanner(System.in);
        long x;
        int i;

        PrintWriter printWriter = new PrintWriter(System.out);

        while(true) {
            if((x = scanner.nextLong())== 0) {
                break;
            }
            printWriter.printf("Case %d: %ld", ++i, x);
        }
        printWriter.close();
    }

    static class FastScanner {
        private BufferedReader reader = null;
        private StringTokenizer tokenizer = null;

        public FastScanner(InputStream in) {
            reader = new BufferedReader(new InputStreamReader(in));
            tokenizer = null;
        }

        public String next() {
            if (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public String nextLine() {
            if (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    return reader.readLine();
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }

            return tokenizer.nextToken("\n");
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public long nextInt() {
            return Integer.parseInt(next());
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

        public int[] nextIntArray(int n) {
            int[] a = new int[n];
            for (int i = 0; i < n; i++)
                a[i] = nextInt();
            return a;
        }

        public long[] nextLongArray(int n) {
            long[] a = new long[n];
            for (int i = 0; i < n; i++)
                a[i] = nextLong();
            return a;
        }
    }
}



Compiler output:
Main.java:70: error: incompatible types: possible lossy conversion from long to int
                a[i] = nextInt();
                              ^
1 error
Language: Java

import java.io.*;
import java.util.StringTokenizer;


public class Main {

    public static void main(String[] args) throws Exception {
        FastScanner scanner = new FastScanner(System.in);
        long x;
        int i = 0;

        PrintWriter printWriter = new PrintWriter(System.out);

        while(true) {
            if((x = scanner.nextLong())== 0) {
                break;
            }
            printWriter.printf("Case %d: %ld", ++i, x);
        }
        printWriter.close();
    }

    static class FastScanner {
        private BufferedReader reader = null;
        private StringTokenizer tokenizer = null;

        public FastScanner(InputStream in) {
            reader = new BufferedReader(new InputStreamReader(in));
            tokenizer = null;
        }

        public String next() {
            if (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public String nextLine() {
            if (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    return reader.readLine();
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }

            return tokenizer.nextToken("\n");
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public long nextInt() {
            return Integer.parseInt(next());
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

        public int[] nextIntArray(int n) {
            int[] a = new int[n];
            for (int i = 0; i < n; i++)
                a[i] = nextInt();
            return a;
        }

        public long[] nextLongArray(int n) {
            long[] a = new long[n];
            for (int i = 0; i < n; i++)
                a[i] = nextLong();
            return a;
        }
    }
}


Compiler output:
Main.java:70: error: incompatible types: possible lossy conversion from long to int
                a[i] = nextInt();
                              ^
1 error
Language: Java

import java.io.*;

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

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

        int i = 0;
        String str;
        int x;
        
        while (true) {
            str = br.readLine();
            x = Integer.parseInt(str);
            if (x == 0) {
                break; 
            }
            System.out.printf("Case %d: %d", ++i, x);
            }
    }
}



Compiler output:
Main.java:14: error: unreported exception IOException; must be caught or declared to be thrown
            str = br.readLine();
                             ^
1 error
Language: Java

import java.io.*;

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

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

        int i = 0;
        String str;
        int x;

        while (true) {
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            x = Integer.parseInt(str);
            if (x == 0) {
                break;
            }
            System.out.printf("Case %d: %d", ++i, x);
        }
    }
}



Compiler output:
Main.java:19: error: variable str might not have been initialized
            x = Integer.parseInt(str);
                                 ^
1 error
Language: Java

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int i, N;
        int Case[];
        Case = new int[10];
        for(i = 1; i < 100 ; i++) {
            int x = sc.nextInt();
            N = i;
            Case[i] = x;
            if(x == 0) break;
        }
        for(i = 1; i < N; i++) {
            System.out.println("Case " + i + ": " + Case[i]);
        }
    }
}


Compiler output:
Main.java:15: error: variable N might not have been initialized
        for(i = 1; i < N; i++) {
                       ^
1 error
Language: Java

import java.util.Scanner;

public class Main{
	public static void main(String[]args){
		int i = 1, num;

		num = sc.nextInt();

		while(num != 0){
			System.out.println("Case " + i + ": " + num);
			i++;
		}
	}
}


Compiler output:
Main.java:7: error: cannot find symbol
		num = sc.nextInt();
		      ^
  symbol:   variable sc
  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);

	for(int i = 1;;i++){
        int n = sc.nextInt();
        if(n==0){
            break;
        }
                System.out.println("case "+i+" : "+n);

    }
    }



Compiler output:
Main.java:15: 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);
        for(i=0;;i++){
            int x = sc.nextInt();
            if(x == 0) break;
            System.out.printf("Case %d: %d",i,x);
        }
    }
}



Compiler output:
Main.java:6: error: cannot find symbol
        for(i=0;;i++){
            ^
  symbol:   variable i
  location: class Main
Main.java:6: error: cannot find symbol
        for(i=0;;i++){
                 ^
  symbol:   variable i
  location: class Main
Main.java:9: error: cannot find symbol
            System.out.printf("Case %d: %d",i,x);
                                            ^
  symbol:   variable i
  location: class Main
3 errors
Language: Java

import java.util.Scanner;

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

    for (int i = 1; (n = scanner.nextInt()) != 0; ++i) {
      System.out.println("Case " + i + ": " + n);
    }
  }
}


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

import java.io.*;

public class Main {
    public static void main(String[] args) {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));

        String num;
        while(true){
            num = reader.readLine();
            if(num.equals("0")) {
                break;
            }
            System.out.printf("Case %d: %d", i, x);
        }
    }
}


Compiler output:
Main.java:13: error: cannot find symbol
            System.out.printf("Case %d: %d", i, x);
                                             ^
  symbol:   variable i
  location: class Main
Main.java:13: error: cannot find symbol
            System.out.printf("Case %d: %d", i, x);
                                                ^
  symbol:   variable x
  location: class Main
2 errors
Language: Java

import java.util.Scanner;

public class While {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int x = sc.nextInt();
        int i = 1;
        while( x != 0){
            System.out.printf("Case %d: %d\n", i, x);
            x = sc.nextInt();
            i++;
        }
    }
}


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


public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        for (int i = 1; i < 10000; i++) {
            int x = sc.nextInt();
            System.out.println("Case " + i + "; " + x);
        }
    }
}



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

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

        int[] x;
        x = new int[10000];
        int i=0;

        while(true){
            x[i] = sc.nextInt();

            if (x[i] == 0)
                break;

            i++;
        }

        i=0;
        while(true){
            System.out.println("Case " + i + " " + x[i++]);
            if(x[i] == 0)
                break;
        }

    }
}


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 PrintTest {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        for (int i = 1; ; i++) {
            int x = sc.nextInt();
            System.out.printf("Case i: " + x +"\n");
            if(x == 0) {
                break;
            }else {
            }
            }
        }
    }


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

import java.util.Scanner;

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

        int i = 1;
        while(true){
            int x = sc.nextInt();

            if(x==0) {
                break;
            }else{
                System.out.println("Caae " + i++ + ": " + x);
            }
        }
    }
}



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


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

        while(true){
        Scanner sc = new Scanner(System.in);
                int x = sc.nextInt();
                int i++;
                  if(x==0){
                      break;
                   }
                System.out.printf("Case %d: %d",i,x);

            }
    }
    }


Compiler output:
Main.java:9: error: ';' expected
                int i++;
                     ^
1 error
Language: Java

import java.util.Scanner;

public class Main {
    public static void main{
        Scanner sc = new Scanner(System.in);
        int x = sc.nextInt();
        int i=1;

            while(x!=0){

                System.out.print("Case " + i++ + ":" + x);
                x = sc.nextInt();
            }

        }
    }


Compiler output:
Main.java:4: error: '(' expected
    public static void main{
                           ^
1 error
Language: Java

import java.io.*;
public class Main{
		  public static void main(String[]args){
		    BufferedReader reader = new BufferedReader(newInputStreamReader(System.in));
		    try{
		    	int i = 1;
		    	while(true) {
		          String line = reader.readLine();
		          int x = Integer.parseInt(line);
		          if(x == 0) break;
		          System.out.println("Case" +i+":" +x);
		          ++i;
		          }
		    	reader.close();
		    }catch(IOException e) {
		    }
		  }
		}


Compiler output:
Main.java:4: error: cannot find symbol
		    BufferedReader reader = new BufferedReader(newInputStreamReader(System.in));
		                                               ^
  symbol:   method newInputStreamReader(InputStream)
  location: class Main
1 error
Language: Java

import java.io.*;
public class PrintTestCases{
		  public static void main(String[]args){
		    BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		    try{
		    	int i = 1;
		    	while(true) {
		          String line = reader.readLine();
		          int x = Integer.parseInt(line);
		          if(x == 0) break;
		          System.out.println("Case" +i+":" +x);
		          ++i;
		          
		          }
		    	reader.close();
		    }catch(IOException e) {
		    	
		    }
		  }
		}


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

import java.util.Scanner;

public class Main() {
    public static void main{
        Scanner sc = new Scanner(System.in);
        int x = sc.nextInt();
        int i=1;

            while(x!=0){

                System.out.print("Case " + i++ + ":" + x);
                x = sc.nextInt();
            }

        }
    }


Compiler output:
Main.java:3: error: '{' expected
public class Main() {
                 ^
Main.java:4: error: '(' expected
    public static void main{
                           ^
2 errors
Language: Java

import java.util.Scanner;

public class Main {
    public static void main(string[] args){
        Scanner sc = new Scanner(System.in);
        int x = sc.nextInt();
        int i=1;

            while(x!=0){

                System.out.print("Case " + i++ + ":" + x);
                x = sc.nextInt();
            }

        }
    }


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


import java.util.Scanner;
public class Main {
        public static void main(String[] args) {
            int i=1;
        while(true){
        Scanner sc = new Scanner(System.in);
                int x = sc.nextInt();
                  if(x==0){
                      break;
                   }
                      System.out.printf("Case %d: %d",i,x);
                      i++;
                  }
            }
    }
    }


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

import java.util.Scanner;

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

        int i = 1;
        while(true){
            int x = sc.nextInt();

            if(x==0) {
                break;
            }else{
                System.out.println("Case " + i++ + ": " + x);
            }
        }
    }
}



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

public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int a, i = 1;
        while(true){
            a = sc.nextInt();
            if(a == 0) break;
            System.out.println("case "+i+": "+a);
            i++;
        }
    }
}


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 Aizu {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int x,i=1;
		while(true){
			x=sc.nextInt();
			if(x==0)break;
			System.out.println("Case "+ i +": "+ x);
			i++;
		}
		sc.close();
	}
}


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

import java.util.Scanner;
public class Aizu {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int x,i=1;
		while(true){
			x=sc.nextInt();
			if(x==0)break;
			System.out.println("Case "+ i +": "+ x);
			i++;
		}
	}
}



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

import java.util.List;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		boolean roopFlag=false;
		List<Integer>test=new ArrayList<Integer>();
		while(!roopFlag) {
			int x=sc.nextInt();
			if(x!=0) {
				test.add(x);
			}else {
				roopFlag=true;
			}

		}
		for (int i = 0; i < test.size(); i++) {
			System.out.println("Case "+(i+1)+": "+test.get(i));
		}

	}

}


Compiler output:
Main.java:9: error: cannot find symbol
		List<Integer>test=new ArrayList<Integer>();
		                      ^
  symbol:   class ArrayList
  location: class Main
1 error
Language: Java

public class Main{
    public static void main(String[] args) {
    	Scanner scn = new Scanner(System.in);
    	List<Integer> list = new ArrayList<Integer>();

    	while(true) {
    		int inputDate = scn.nextInt();
    		if (inputDate != 0) {
    		list.add(inputDate);
    		} else{
    			list.add(inputDate);
    			break;
    		}
    	}
    	for (int i=1; i < list.size(); i++ ) {
    		System.out.println("Case " + i + "; " + list.get(i-1) );
    	}
    }
}


Compiler output:
Main.java:3: error: cannot find symbol
    	Scanner scn = new Scanner(System.in);
    	^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
    	Scanner scn = new Scanner(System.in);
    	                  ^
  symbol:   class Scanner
  location: class Main
Main.java:4: error: cannot find symbol
    	List<Integer> list = new ArrayList<Integer>();
    	^
  symbol:   class List
  location: class Main
Main.java:4: error: cannot find symbol
    	List<Integer> list = new ArrayList<Integer>();
    	                         ^
  symbol:   class ArrayList
  location: class Main
4 errors
Language: Java

import java.util.Scanner;

public class Main03_2 {
	public static void main(String[] args){
		Scanner stdIn = new Scanner(System.in);
		int x = stdIn.nextInt();
		int a = 0;
		while(x>0){
			a++;
			System.out.println("case"+ a + x);
		}
	}
}


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


import java.util.Scanner;

public class Main {
	public static void main(String[] args){
		Scanner stdIn = new Scanner(System.in);
		int x = stdIn.nextInt();
		int a;
		for(a=1;a>1000;a++){
			if(x<=0){
				a=1000;
			}
		}
	}



Compiler output:
Main.java:14: 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 stdIn = new Scanner(System.in);
		int x = stdIn.nextInt();
		int a;
		while(a>1000){
			System.out.print("case"+ a +":"+ x);
			a++;
			if(x<=0){
				a=1000;
			}
		}
	}
}


Compiler output:
Main.java:8: error: variable a might not have been initialized
		while(a>1000){
		      ^
1 error
Language: Java

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

		for (int i = 1; i <= 10000; i++) {
			x = sc.nextInt();
			if (x == 0) {
				break;
			}
			System.out.println("Case " + i + ": " + x);

		}

	}

}


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:16: error: class, interface, enum, or record expected
}
^
2 errors
Language: Java

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

		for (int i = 1; i <= 10000; i++) {
			x = sc.nextInt();
			if (x == 0) {
				break;
			}
			System.out.println("Case " + i + ": " + x);

		}

	}


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)
1 error
Language: Java

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

		for (int i = 1; i <= 10000; i++) {
			x = sc.nextInt();
			if (x == 0) {
				break;
			}
			System.out.println("Case " + i + ": " + x);

		}
		sc.close();
	}



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)
1 error
Language: Java

	public static void main() {
		java.util.Scanner sc = new java.util.Scanner(System.in);
		int x;

		for (int i = 1; i <= 10000; i++) {
			x = sc.nextInt();
			if (x == 0) {
				break;
			}
			System.out.println("Case " + i + ": " + x);

		}
		sc.close();
	}


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


public class ITP1_3_B {

	public static void main() {
		java.util.Scanner sc = new java.util.Scanner(System.in);
		int x;

		for (int i = 1; i <= 10000; i++) {
			x = sc.nextInt();
			if (x == 0) {
				break;
			}
			System.out.println("Case " + i + ": " + x);

		}
		sc.close();
	}

}


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

	public static void main() {
		java.util.Scanner sc = new java.util.Scanner(System.in);
		int x;
		for (int i = 1; i <= 10000; i++) {
			x = sc.nextInt();
			if (x == 0) {
				break;
			}
			System.out.println("Case " + i + ": " + x);
		}
		sc.close();
	}


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

public class ITP1_3_B {

	public static void main() {
		java.util.Scanner sc = new java.util.Scanner(System.in);
		int x;
		for (int i = 1; i <= 10000; i++) {
			x = sc.nextInt();
			if (x == 0) {
				break;
			}
			System.out.println("Case " + i + ": " + x);
		}
		sc.close();
	}
}


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

import java.util.Scanner;

public static void main(String[] args) {
		int i,x,y;
		Scanner sc = new Scanner(System.in);
		for(i=1;;i++){
		    x = sc.nextInt()
		    if(x == 0){
		        sc.close();
		        return;
		    }
		    System.out.println("case "+i+": "+x);
		}
	}


Compiler output:
Main.java:3: 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:7: error: ';' expected
		    x = sc.nextInt()
		                    ^
2 errors
Language: Java

import java.util.Scanner;
public class Mian{
    public static void main(String[] args) {
		int i,x,y;
		Scanner sc = new Scanner(System.in);
		for(i=1;;i++){
		    x = sc.nextInt()
		    if(x == 0){
		        sc.close();
		        return;
		    }
		    System.out.println("case "+i+": "+x);
		}
	}
}


Compiler output:
Main.java:7: error: ';' expected
		    x = sc.nextInt()
		                    ^
1 error
Language: Java

import java.util.Scanner;
public class Mian{
    public static void main(String[] args) {
		int i,x,y;
		Scanner sc = new Scanner(System.in);
		for(i=1;;i++){
		    x = sc.nextInt();
		    if(x == 0){
		        sc.close();
		        return;
		    }
		    System.out.println("case "+i+": "+x);
		}
	}
}


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

import java.util.Scaner;
public class Main{
    public static void main(String[] args){
        int ans[] = new int[10000];
        int n = 0;
        Scanner sc = new Scanner(System.in)
        while(1){
            ans[n] = sc.nextInt();
            if(ans[n]==0)break;
            n++;
        }
        for(int i = 0;i<=n;i++){
            System.out.println("Case "+i+1+": "+ans[i]);
        }
    }
}


Compiler output:
Main.java:6: error: ';' expected
        Scanner sc = new Scanner(System.in)
                                           ^
1 error
Language: Java

import java.util.Scaner;
public class Main{
    public static void main(String[] args){
        int ans[] = new int[10000];
        int n = 0;
        Scanner sc = new Scanner(System.in);
        while(1){
            ans[n] = sc.nextInt();
            if(ans[n]==0)break;
            n++;
        }
        for(int i = 0;i<=n;i++){
            System.out.println("Case "+i+1+": "+ans[i]);
        }
    }
}


Compiler output:
Main.java:1: error: cannot find symbol
import java.util.Scaner;
                ^
  symbol:   class Scaner
  location: package java.util
Main.java:6: error: cannot find symbol
        Scanner sc = new Scanner(System.in);
        ^
  symbol:   class Scanner
  location: class Main
Main.java:6: error: cannot find symbol
        Scanner sc = new Scanner(System.in);
                         ^
  symbol:   class Scanner
  location: class Main
Main.java:7: error: incompatible types: int cannot be converted to boolean
        while(1){
              ^
4 errors
Language: Java

import java.util.Scanner;
public class Main{
    public static void main(String[] args){
        int ans[] = new int[10000];
        int n = 0;
        Scanner sc = new Scanner(System.in);
        while(1){
            ans[n] = sc.nextInt();
            if(ans[n]==0)break;
            n++;
        }
        for(int i = 0;i<=n;i++){
            System.out.println("Case "+i+1+": "+ans[i]);
        }
    }
}


Compiler output:
Main.java:7: error: incompatible types: int cannot be converted to boolean
        while(1){
              ^
1 error
Language: Java


import java.util.Scanner;


class Main{

public static void main(String [] args);

Scanner sc = new Scanner(System.in);

int a = sc.nextInt();

if(a != 0){
    System.out.println("Case 1: " + a);
}else{
}




Compiler output:
Main.java:13: error: illegal start of type
if(a != 0){
^
Main.java:13: error: <identifier> expected
if(a != 0){
    ^
Main.java:15: error: illegal start of type
}else{
 ^
Main.java:16: error: reached end of file while parsing
}
 ^
4 errors
Language: Java


import java.util.Scanner;


class Main{

public static void main(String [] args);

Scanner sc = new Scanner(System.in);

int a = sc.nextInt();

if(a != 0){
    System.out.println("Case 1: " + a);
}else{
}

}
}



Compiler output:
Main.java:13: error: illegal start of type
if(a != 0){
^
Main.java:13: error: <identifier> expected
if(a != 0){
    ^
Main.java:15: error: illegal start of type
}else{
 ^
Main.java:19: error: class, interface, enum, or record expected
}
^
4 errors
Language: Java


import java.util.Scanner;


class Main{

public static void main(String [] args);

Scanner sc = new Scanner(System.in);

int i = 1;

while(true){
   int x = sc.nextInt();

   if(x != 0){
     System.out.println("Case " + "i" + ": " + x);
    }else{
    break;
}
}

    
     




}
}



Compiler output:
Main.java:13: error: illegal start of type
while(true){
^
Main.java:30: error: class, interface, enum, or record expected
}
^
2 errors
Language: Java


import java.util.Scanner;


class Main{

public static void main(String [] args);

Scanner sc = new Scanner(System.in);

int i = 1;

while(true){
   int x = sc.nextInt();

   if(x != 0){
     System.out.println("Case " + "i" + ": " + x);
    }else{
    break;

    
}

i++

}

    
     




}
}



Compiler output:
Main.java:13: error: illegal start of type
while(true){
^
Main.java:24: error: ';' expected
i++
   ^
Main.java:35: 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 i = 1;

while(true){
   int x = sc.nextInt();

   if(x != 0){
     System.out.println("Case " + i + ": " + x);
    }else{
    break;

    
}

i++

}

    
     




}
}



Compiler output:
Main.java:13: error: illegal start of type
while(true){
^
Main.java:24: error: ';' expected
i++
   ^
Main.java:35: 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 i = 1;

while(1){
   int x = sc.nextInt();

   if(x != 0){
     System.out.println("Case " + i + ": " + x);
    }else{
    break;

    
}

i++

}

    
     




}
}



Compiler output:
Main.java:13: error: illegal start of type
while(1){
^
Main.java:24: error: ';' expected
i++
   ^
Main.java:35: 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 i = 1;

one:while(1){
   int x = sc.nextInt();

   if(x != 0){
     System.out.println("Case " + i + ": " + x);
    }else{
    break;

    
}

i++

}

    
     




}
}



Compiler output:
Main.java:13: error: <identifier> expected
one:while(1){
   ^
Main.java:24: error: ';' expected
i++
   ^
Main.java:35: 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 i = 1;

for(){
   int x = sc.nextInt();

   if(x != 0){
     System.out.println("Case " + i + ": " + x);
    }else{
    break;

    
}

i++

}

    
     




}
}



Compiler output:
Main.java:13: error: illegal start of type
for(){
^
Main.java:24: error: ';' expected
i++
   ^
Main.java:35: 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);

for(int i = 1;;i++){
   int x = sc.nextInt();

   if(x != 0){
     System.out.println("Case " + i + ": " + x);
    }else{
    break;

    
}

i++

}

    
     




}
}



Compiler output:
Main.java:11: error: illegal start of type
for(int i = 1;;i++){
^
Main.java:11: error: <identifier> expected
for(int i = 1;;i++){
                ^
Main.java:22: error: ';' expected
i++
   ^
Main.java:33: error: class, interface, enum, or record expected
}
^
4 errors
Language: Java


import java.util.Scanner;


class Main{

public static void main(String [] args){

Scanner sc = new Scanner(System.in);

for(int i = 1;;i++){
   int x = sc.nextInt();

   if(x != 0){
     System.out.println("Case " + i + ": " + x);
    }else{
    break;

    
}

i++

}

    
     




}
}



Compiler output:
Main.java:22: error: ';' expected
i++
   ^
1 error
Language: Java

public class ITP1_3_B {

	public static void main(String[] args) {
		int i = 1;

		do {

			Scanner sc = new Scanner(System.in);
	        int x = sc.nextInt();

	        if (x == 0) {
	        	sc.close();
	        	break;
	        }else {
	        	System.out.println( "Case "+ i +":"+" "+ x );
				i++;
				continue;
	        }

		}while(true);

	}

}


Compiler output:
Main.java:1: error: class ITP1_3_B is public, should be declared in a file named ITP1_3_B.java
public class ITP1_3_B {
       ^
Main.java:8: error: cannot find symbol
			Scanner sc = new Scanner(System.in);
			^
  symbol:   class Scanner
  location: class ITP1_3_B
Main.java:8: error: cannot find symbol
			Scanner sc = new Scanner(System.in);
			                 ^
  symbol:   class Scanner
  location: class ITP1_3_B
3 errors
Language: Java

public class ITP1_3_B {

	public static void ITP1_3_B(String[] args) {
		int i = 1;

		do {

			Scanner sc = new Scanner(System.in);
	        int x = sc.nextInt();

	        if (x == 0) {
	        	sc.close();
	        	break;
	        }else {
	        	System.out.println( "Case "+ i +":"+" "+ x );
				i++;
				continue;
	        }

		}while(true);

	}

}


Compiler output:
Main.java:1: error: class ITP1_3_B is public, should be declared in a file named ITP1_3_B.java
public class ITP1_3_B {
       ^
Main.java:8: error: cannot find symbol
			Scanner sc = new Scanner(System.in);
			^
  symbol:   class Scanner
  location: class ITP1_3_B
Main.java:8: error: cannot find symbol
			Scanner sc = new Scanner(System.in);
			                 ^
  symbol:   class Scanner
  location: class ITP1_3_B
3 errors
Language: Java

public class Main {

	public static void main(String[] args) {
		int i = 1;

		do {

			Scanner sc = new Scanner(System.in);
	        int x = sc.nextInt();

	        if (x == 0) {
	        	sc.close();
	        	break;
	        }else {
	        	System.out.println( "Case "+ i +":"+" "+ x );
				i++;
				continue;
	        }

		}while(true);

	}

}


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

public class ITP1_3_B {

	public static void main(String[] args) {
		int i = 0;
		int[] nums = new int[10000];
		Scanner sc = new Scanner(System.in);

		do {


	        int x = sc.nextInt();

	        if (x == 0) {
	        	break;
	        }else {
	        	nums[i] = x;
	        }

	        i++;

		}while(true);

		for (int j = 0; nums[j] > 0; j++) {
			System.out.println( "Case "+ (j + 1) +": "+ nums[j] );

		}

		sc.close();

	}

}


Compiler output:
Main.java:1: error: class ITP1_3_B is public, should be declared in a file named ITP1_3_B.java
public class ITP1_3_B {
       ^
Main.java:6: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class ITP1_3_B
Main.java:6: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		                 ^
  symbol:   class Scanner
  location: class ITP1_3_B
3 errors
Language: Java

public class Main {

	public static void main(String[] args) {
		int i = 0;
		int[] nums = new int[10000];
		Scanner sc = new Scanner(System.in);

		do {


	        int x = sc.nextInt();

	        if (x == 0) {
	        	break;
	        }else {
	        	nums[i] = x;
	        }

	        i++;

		}while(true);

		for (int j = 0; nums[j] > 0; j++) {
			System.out.print( "Case "+ (j + 1) +": "+ nums[j] + "\n" );

		}

		sc.close();

	}

}



Compiler output:
Main.java:6: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:6: 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 ITP1_3_B {

	public static void main(String[] args) {
		int i = 0;
		int[] nums = new int[10000];
		Scanner sc = new Scanner(System.in);

		do {


	        int x = sc.nextInt();

	        if (x == 0) {
	        	break;
	        }else {
	        	nums[i] = x;
	        }

	        i++;

		}while(true);

		for (int j = 0; nums[j] > 0; j++) {
			System.out.print( "Case "+ (j + 1) +": "+ nums[j] + "\n" );

		}

		sc.close();

	}

}



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

package quest;
import java.util.Scanner;

public class ITP1_3_B {

	public static void main(String[] args) {
		int i = 0;
		int[] nums = new int[10000];
		Scanner sc = new Scanner(System.in);

		do {


	        int x = sc.nextInt();

	        if (x == 0) {
	        	break;
	        }else {
	        	nums[i] = x;
	        }

	        i++;

		}while(true);

		for (int j = 0; nums[j] > 0; j++) {
			System.out.print( "Case "+ (j + 1) +": "+ nums[j] + "\n" );

		}

		System.out.println();
		sc.close();

	}

}



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

import java.util.Scanner;

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

		do {


	        int x = sc.nextInt();

	        if (x == 0) {
	        	break;
	        }else {
	        	System.out.println( "Case "+ (i + 1) +": "+ x);
	        }

	        i++;

		}while(true);
		sc.close();
	}
}


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


public class Main {

    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        while (true) {
            int i = 1;
            int num = Integer.parseInt(br.readLine());
            if (num == 0) {
                break;
            }
            System.out.printf("Case "+ i +": "+ num);
        }
    }
}



Compiler output:
Main.java:4: error: cannot find symbol
    public static void main(String[] args) throws IOException {
                                                  ^
  symbol:   class IOException
  location: class Main
Main.java:5: error: cannot find symbol
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        ^
  symbol:   class BufferedReader
  location: class Main
Main.java:5: error: cannot find symbol
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
                                ^
  symbol:   class BufferedReader
  location: class Main
Main.java:5: error: cannot find symbol
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
                                                   ^
  symbol:   class InputStreamReader
  location: class Main
4 errors
Language: Java


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

public class PMain {

    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        while (true) {
            int i = 1;
            int num = Integer.parseInt(br.readLine());
            if (num == 0) {
                break;
            }
            System.out.printf("Case "+ i +": "+ num);
        }
    }
}



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

import java.io.*;
import java.util.Scanner;
 
public class Main {
    public static void print() {
        Scanner sc = new Scanner(System.in);
        int count = 1, i;
        while (i = sc.nextInt() != 0) {
            System.out.println("Case " + count + ": " + i);
            count++;
        }
    }
 
    public static void main (String[] args) {
        // Scanner sc = new Scanner(System.in);
        // int W = sc.nextInt();
        // int H = sc.nextInt();
        // int x = sc.nextInt();
        // int y = sc.nextInt();
        // int r = sc.nextInt();
        print();
    }
}


Compiler output:
Main.java:8: error: incompatible types: boolean cannot be converted to int
        while (i = sc.nextInt() != 0) {
                                ^
Main.java:8: error: incompatible types: int cannot be converted to boolean
        while (i = sc.nextInt() != 0) {
                 ^
2 errors
Language: Java

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		while(sc.hasNext()) {
		int a = sc.nextInt();
		if(a==0) 
			break;
		}
		int i=1;
		
			System.out.printf("case %d:%d\n",i,a);
			i++;
	}
}



Compiler output:
Main.java:14: error: cannot find symbol
			System.out.printf("case %d:%d\n",i,a);
			                                   ^
  symbol:   variable a
  location: class Main
1 error
Language: Java

import java.util.*;

class Main(
    public static void main(String args[]){
        Sannner a = new Scanner(System.in);
        
        int b;
        int c=0;
        do{
            b = a.nextInt();
            c++;
            if(b!=0){
                System.out.println("Case "+c+": "+b);
            }
        }while(b!=0);
    }
}



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

import java.util.*;

class Main{
    public static void main(String args[]){
        Sannner a = new Scanner(System.in);
        
        int b;
        int c=0;
        do{
            b = a.nextInt();
            c++;
            if(b!=0){
                System.out.println("Case "+c+": "+b);
            }
        }while(b!=0);
    }
}



Compiler output:
Main.java:5: error: cannot find symbol
        Sannner a = new Scanner(System.in);
        ^
  symbol:   class Sannner
  location: class Main
1 error
Language: Java

import java.util.*;

public class Main {
  public static void main(String[] args) {
    int count = 0;
    while(true) {
      count++;
      int a = sc.nextInt();
      if(a == 0) {
        break;
      } else {
        System.out.println("case " + count + ": " + a);
      }
    }
  }
}



Compiler output:
Main.java:8: error: cannot find symbol
      int a = sc.nextInt();
              ^
  symbol:   variable sc
  location: class Main
1 error
Language: Java

import java.util.Scanner;
public class Ex1_3_B {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n =10000;
		
		for(int i=1;i<n;i++){
			int x = sc.nextInt();
			if(x ==  0)
				break;
			System.out.println("case"+ i + ":"+ x);
		}
	}
}


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