criyle/codenet-compile-errors huggingface dataset:
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 x = sc.nextInt();
				if(x = 0){
					break;
				}
				System.out.println("Case %d: %d"i,x);
			}
		}
}

Compiler output:
Main.java:11: error: ')' or ',' expected
				System.out.println("Case %d: %d"i,x);
				                                ^
Main.java:11: error: ';' expected
				System.out.println("Case %d: %d"i,x);
				                                 ^
Main.java:11: error: not a statement
				System.out.println("Case %d: %d"i,x);
				                                  ^
Main.java:11: error: ';' expected
				System.out.println("Case %d: %d"i,x);
				                                   ^
4 errors
Language: Java

import java.util.Scanner;

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

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

import java.util.Scanner;

public class P041304{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		for(int i = 1;;i++){
			int x = sc.nextInt();
			if(x==0){
				break;
			}else{
				System.out.printf("case %d: %d\n",i,x);
			}
		}
	}
}

Compiler output:
Main.java:3: error: class P041304 is public, should be declared in a file named P041304.java
public class P041304{
       ^
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 x = sc.nextInt();
			if(x==0) break;
				System.out.printf("case %d: %d\n",i,x);
		}
	}
}

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

import java.util.Scanner;

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

Compiler output:
Main.java:3: error: class Cases is public, should be declared in a file named Cases.java
public class Cases {
       ^
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 x=sc.nextInt();
	if(x != 0){
	System.out.println("Case" + i + ":"+x);
        
	}
    else
    {
        break;
    }
	}
}
}

Compiler output:
Main.java:5: error: illegal start of expression
	for(int i = 1;;i + +){
	                    ^
Main.java:5: error: not a statement
	for(int i = 1;;i + +){
	                 ^
2 errors
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 x=sc.nextInt();
	if(x! = 0){
	System.out.println("Case" + i + ":"+x);
        
	}
    else
    {
        break;
    }
	}
}
}

Compiler output:
Main.java:8: error: ')' expected
	if(x! = 0){
	    ^
Main.java:8: error: illegal start of expression
	if(x! = 0){
	      ^
Main.java:8: error: ';' expected
	if(x! = 0){
	         ^
Main.java:12: error: 'else' without 'if'
    else
    ^
4 errors
Language: Java

import java.util.Scanner;
public class Main{
	public stastic void main(String[]args){
	Scanner sc = new scanner(System.in);
	for(int i = 1;;i++){

	int x=sc.nextInt();

	System.out.println("Case"+i+":"+x);	
	}
}
}

Compiler output:
Main.java:3: error: <identifier> expected
	public stastic void main(String[]args){
	              ^
1 error
Language: Java

import java.util.Scanner;
public class Main{
	public stastic void main(String[]args){
	Scanner sc = new scanner(System.in);
	for(int i=1;;i++){

	int x=sc.nextInt();

	System.out.println("Case"+i+":"+x);

	
	}
}
}

Compiler output:
Main.java:3: error: <identifier> expected
	public stastic 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);
    
    
	for(int i = 1;;i++){
        

	int x=sc.nextInt();
        if(x != 0)
        {
	System.out.printf("Case i : x?\n",%d,%d);
        }
        else
        {
            break;
        }
        }
	
    }
        
}

Compiler output:
Main.java:13: error: illegal start of expression
	System.out.printf("Case i : x?\n",%d,%d);
	                                  ^
Main.java:13: error: illegal start of expression
	System.out.printf("Case i : x?\n",%d,%d);
	                                     ^
2 errors
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 x=sc.nextInt();
        if(x != 0)
        {
	System.out.printf("Case i : x ?\n",%d,%d);
        }
        else
        {
            break;
        }
        }
	
    }
        
}

Compiler output:
Main.java:13: error: illegal start of expression
	System.out.printf("Case i : x ?\n",%d,%d);
	                                   ^
Main.java:13: error: illegal start of expression
	System.out.printf("Case i : x ?\n",%d,%d);
	                                      ^
2 errors
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 x = sc.nextInt();
        if(x != 0)
        {
	System.out.println("Case %d: %?\n",i,x);
        }
        else
        {
            break;
        }
        }
	
    }
        
}

Compiler output:
Main.java:13: error: no suitable method found for println(String,int,int)
	System.out.println("Case %d: %?\n",i,x);
	          ^
    method PrintStream.println() is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(boolean) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(char) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(int) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(long) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(float) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(double) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(char[]) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(String) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(Object) is not applicable
      (actual and formal argument lists differ in length)
1 error
Language: Java

class Main {
	public static void main(String[] args){
    int index=0;
    ArrayList<Integer> ar = new ArrayList<Integer>();
	while(true){
		java.util.Scanner scanner = new java.util.Scanner(System.in);
		int num = scanner.nextInt();
		ar.add(num);
		if(ar.get(index)==0){
			scanner.close();
			break;
		}
		index++;
	}
	
	for(int i=0;i<index;i++){
	int	num=i+1;
		System.out.println("Case"+num+": "+ar.get(i));
	}
	}
}

Compiler output:
Main.java:4: error: cannot find symbol
    ArrayList<Integer> ar = new ArrayList<Integer>();
    ^
  symbol:   class ArrayList
  location: class Main
Main.java:4: error: cannot find symbol
    ArrayList<Integer> ar = new ArrayList<Integer>();
                                ^
  symbol:   class ArrayList
  location: class Main
2 errors
Language: Java

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

class Main {
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int x = scan.nextInt();
        int count = 1;

        while(x){
            System.out.println("Case " + count + ": " + x);
            x = scan.nextInt();
        }
    }
}

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

import java.util.*;

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

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

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

import java.util.*;
public class Main {
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        while(1){
        int a = scan.nextInt();
        System.out.println(a);
        if(a==0) break;
  }
 }

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

import java.util.*;
public class Main {
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        while(1){
        int a = scan.nextInt();
        System.out.println(a);
        if(a==0) break;
  }
 }
}

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

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

Compiler output:
Main.java:9: error: cannot find symbol
        System.out.println(Case+" "+1+":"+a);
                           ^
  symbol:   variable Case
  location: class Main
1 error
Language: Java

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

Compiler output:
Main.java:9: error: cannot find symbol
        System.out.println(Case+" "+i+":"+a);
                           ^
  symbol:   variable Case
  location: class Main
1 error
Language: Java

import java.util.*;
public class Main {
    public static void main(String[] args){
        int i=0;
        Scanner scan = new Scanner(System.in);
        while(scan.hasNext())
        int a = scan.nextInt();
        System.out.println("Case "+i+": "+a);
        i++;
        if(a==0) break;
  }
 }
}

Compiler output:
Main.java:7: error: variable declaration not allowed here
        int a = scan.nextInt();
            ^
Main.java:13: error: class, interface, enum, or record expected
}
^
2 errors
Language: Java

 import java.util.Scanner;
 
 public class 10005{
     public static void main(String[] args){
         Scanner sc = new Scanner (System.in)
         int i=0;
         int a;
         while(1){
             a=next.Int();
             if(a!=0){
                 Sytem.out.printf("Case %d: %d",i,a);
                 i++;
             }
             else break;
         }
     }
 }

Compiler output:
Main.java:3: error: <identifier> expected
 public class 10005{
             ^
Main.java:5: error: ';' expected
         Scanner sc = new Scanner (System.in)
                                             ^
2 errors
Language: Java

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

Compiler output:
Main.java:3: error: class PTC is public, should be declared in a file named PTC.java
 public class PTC {
        ^
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 x = nextInt();
      System.out.println("Case " + i + ": " + x);
    }
  }
}

Compiler output:
Main.java:7: error: cannot find symbol
      int x = nextInt();
              ^
  symbol:   method nextInt()
  location: class Main
1 error
Language: Java

import java.util.Scanner;

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

		for (int i = 1;; i++) {
			int x = sc.nextInt();
			if (x == 0)
				break;
			System.out.printf("Case %d: %d", i, x);
		}
	}
}

Compiler output:
Main.java:3: error: class Print_Test_Cases is public, should be declared in a file named Print_Test_Cases.java
public class Print_Test_Cases {
       ^
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 x = next.Int();
      System.out.println("Case " + i + ": " + x);
    }
  }
}

Compiler output:
Main.java:7: error: cannot find symbol
      int x = next.Int();
              ^
  symbol:   variable next
  location: class Main
1 error
Language: Java

import java.io.*;

public class Main{
  public static void main(String[] args){
    int i = 1;
    while(true){
      BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
      int x = Integer.valueOf(br.readLine());
      if (x == 0)
        break;
      else
        System.out.println("Case " + i++ + ": " + in);
      }
  }
}

Compiler output:
Main.java:12: error: cannot find symbol
        System.out.println("Case " + i++ + ": " + in);
                                                  ^
  symbol:   variable in
  location: class Main
1 error
Language: Java

import java.util.Scanner;

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

    while(x = sc.nextInt()) {
      System.out.println("Case " + ++cnt + ": " + x); 
    }
  }
}

Compiler output:
Main.java:9: error: incompatible types: int cannot be converted to boolean
    while(x = sc.nextInt()) {
            ^
1 error
Language: Java

import java.util.Scanner;

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

    while(x = sc.nextInt() != 0) {
      System.out.println("Case " + ++cnt + ": " + x); 
    }
  }
}

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

import java.util.Scanner;

public class practice{
    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;
	    System.out.println("Case "+ i +": " + x);
	    i++;
	}
    }
}

	

Compiler output:
Main.java:3: error: class practice is public, should be declared in a file named practice.java
public class practice{
       ^
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=1;
		while((int x = sc.nextInt()) != null){
			System.out.printf("Case %d:%d\n",i++,x);
		}
	}
}

Compiler output:
Main.java:7: error: ',', ')', or '[' expected
		while((int x = sc.nextInt()) != null){
		            ^
Main.java:7: error: illegal start of expression
		while((int x = sc.nextInt()) != null){
		             ^
Main.java:7: error: illegal start of expression
		while((int x = sc.nextInt()) != null){
		                             ^
Main.java:7: error: ';' expected
		while((int x = sc.nextInt()) != null){
		                                    ^
4 errors
Language: Java

import java.util.Scanner;

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

Compiler output:
Main.java:7: error: '.class' expected
		while(int x = sc.nextInt()){
		          ^
Main.java:7: error: ';' expected
		while(int x = sc.nextInt()){
		                          ^
2 errors
Language: Java

import java.util.Scanner;

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

Compiler output:
Main.java:7: error: variable i is already defined in method main(String[])
		for(int i=1;;i++){
		        ^
1 error
Language: Java

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

Compiler output:
Main.java:2: error: class judge is public, should be declared in a file named judge.java
public class judge{
       ^
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 = 0; ; i++) {
			int x = sc.nextInt();
			if (x == 0)
				break;
			System.out.println("Case" i: x);
		}
	}
}

Compiler output:
Main.java:10: error: ')' or ',' expected
			System.out.println("Case" i: x);
			                         ^
Main.java:10: error: not a statement
			System.out.println("Case" i: x);
			                             ^
Main.java:10: error: ';' expected
			System.out.println("Case" i: x);
			                              ^
3 errors
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 x = sc.nextInt();

if (x=0) break;

System.out.println("case"+i+" "+x);
}

}

}

Compiler output:
Main.java:15: error: incompatible types: int cannot be converted to boolean
if (x=0) break;
     ^
1 error
Language: Java

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

Scanner sc = new Scanner(System.in);


for (int i = 1; ; i++) {

	int x = sc.nextInt();
if(x==0){break;}else{
	System.out.printf("Case %d: %d\n",i,x);}

}

}

}

Compiler output:
Main.java:2: error: class print is public, should be declared in a file named print.java
public class print{
       ^
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 = 1;
		while (true) {
			int num = sc.nextInt();
			if (num == 0) break;
			System.out.println("Case %d: %d", i, num);
			i ++;
		}
	}
}

Compiler output:
Main.java:10: error: no suitable method found for println(String,int,int)
			System.out.println("Case %d: %d", i, num);
			          ^
    method PrintStream.println() is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(boolean) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(char) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(int) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(long) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(float) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(double) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(char[]) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(String) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(Object) is not applicable
      (actual and formal argument lists differ in length)
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 x = sc.nextInt();
			if(x != 0){
			System.out.println("Case %d : %d", i, x); 
			}else{
			break;
			}
		}
	}
}

Compiler output:
Main.java:10: error: no suitable method found for println(String,int,int)
			System.out.println("Case %d : %d", i, x); 
			          ^
    method PrintStream.println() is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(boolean) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(char) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(int) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(long) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(float) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(double) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(char[]) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(String) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(Object) is not applicable
      (actual and formal argument lists differ in length)
1 error
Language: Java

import java.util.Scanner;

public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int array[];
		int i = 0;
		int count =1;
		array = new int[100];
		while(i=0){
			int array[count] = sc.nextInt();
			if(array[count]!=0){
				count++;
			}else{
				i++;
			}
		}
		int k ;
		for(k=1;k<=count;k++){
			System.out.printf("%d",array[k]);
		}
	}
}

Compiler output:
Main.java:11: error: ']' expected
			int array[count] = sc.nextInt();
			          ^
Main.java:11: error: ';' expected
			int array[count] = sc.nextInt();
			               ^
2 errors
Language: Java

import java.util.Scanner;

public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int array[];
		int i = 0;
		int count =1;
		array = new int[100];
		while(i=0){
			int array[count] = sc.nextInt();
			if(array[count]!=0){
				count++;
			}else{
				i++;
			}
		}
		int k ;
		for(k=1;k<=count;k++){
			System.out.printf("Case "+i+": %d",array[k]);
		}
	}
}

Compiler output:
Main.java:11: error: ']' expected
			int array[count] = sc.nextInt();
			          ^
Main.java:11: error: ';' expected
			int array[count] = sc.nextInt();
			               ^
2 errors
Language: Java

import java.util.Scanner;

public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int array[];
		int i = 0;
		int count =1;
		array = new int[100];
		while(i=0){
			int array[count] = sc.nextInt();
			if(array[count]!=0){
				count++;
			}else{
				i++;
			}
		}
		int k ;
		for(k=1;k<=count;k++){
			System.out.prinln("Case "+i+":"+array[k]);
		}
	}
}

Compiler output:
Main.java:11: error: ']' expected
			int array[count] = sc.nextInt();
			          ^
Main.java:11: error: ';' expected
			int array[count] = sc.nextInt();
			               ^
2 errors
Language: Java

import java.util.Scanner;

public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int array[];
		int i = 0;
		int count =1;
		array = new int[100];
		while(i=0){
			int array[count] = sc.nextInt();
			if(array[count]!=0){
				count++;
			}else{
				i++;
			}
		}
		int k ;
		for(k=1;k<=count;k++){
			System.out.println("Case "+i+":"+array[k]);
		}
	}
}

Compiler output:
Main.java:11: error: ']' expected
			int array[count] = sc.nextInt();
			          ^
Main.java:11: error: ';' expected
			int array[count] = sc.nextInt();
			               ^
2 errors
Language: Java



import java.util.Scanner; 

 public class Main{ 
         public static void main(String[] args){ 
                 Scanner sc = new Scanner(System.in); 
                 int array[]; 
                 int i = 0; 
                 int count =1; 
                 array = new int[100]; 
                 while(i=0){ 
                         int array[count] = sc.nextInt(); 
                         if(array[count]!=0){ 
                                 count++; 
                         }else{ 
                                 i++; 
                         } 
                 } 
                 int k ; 
                 for(k=1;k<=count;k++){ 
                         System.out.println("Case "+i+":"+array[k]); 
                 } 
         } 
} 

Compiler output:
Main.java:13: error: ']' expected
                         int array[count] = sc.nextInt(); 
                                   ^
Main.java:13: error: ';' expected
                         int array[count] = sc.nextInt(); 
                                        ^
2 errors
Language: Java



import java.util.Scanner; 

 public class Main{ 
         public static void main(String[] args){ 
                 Scanner sc = new Scanner(System.in); 
                 int array[]; 
                 int i = 0; 
                 int count =1; 
                 array = new int[100]; 
                 while(i=0){ 
                         array[count] = sc.nextInt(); 
                         if(array[count]!=0){ 
                                 count++; 
                         }else{ 
                                 i++; 
                         } 
                 } 
                 int k ; 
                 for(k=1;k<=count;k++){ 
                         System.out.println("Case "+i+":"+array[k]); 
                 } 
         } 
} 

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

import java.util.Scanner;

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

Compiler output:
Main.java:3: 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(String[] args) {
  Scanner sc = new Scanner(System.in);
  int array[] = new int[100];
  int count = 0;
  while (true) {
	int tmp = sc.nextInt();
	array[count] = tmp;
	count ++ ;
	if (tmp == 0) {
		break;
	}
  }

  for (int k = 0; k < count; k++) {
   System.out.println("Case " + (k+1) + ":" + array[k]);
  }
 }

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

import java.util.Scanner;
public class test {
 public static void main(String[] args) {
  Scanner sc = new Scanner(System.in);
  int array[] = new int[100];
  int count = 0;
  while (true) {
	int tmp = sc.nextInt();
	array[count] = tmp;
	count ++ ;
	if (tmp == 0) {
		break;
	}
  }

  for (int k = 0; k < count; k++) {
   System.out.println("Case " + (k+1) + ":" + array[k]);
  }
 }
}

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

import java.util.Scanner;
public class test {
 public static void main(String[] args) {
  Scanner sc = new Scanner(System.in);
  int array[] = new int[100];
  int count = 0;
  while (true) {
	int tmp = sc.nextInt();
	array[count] = tmp;
	count ++ ;
	if (tmp == 0) {
		break;
	}
  }

  for (int k = 0; k < count; k++) {
   System.out.println("Case " + (k+1) + ": " + array[k]);
  }
 }
}

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

public 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){
				break;
			}
			System.out.printf("Case %d: %d\n", i, x);
		}

	}
}

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 test{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int array[] = new int[100];
		int count = 0;
		while(true){
			int tmp = sc.nextInt();
			array[count] = tmp;
			count ++ ;
			if(tmp ==0){
				break;
			}
		}
		for( int k =0;k<count;k++){
			System.out.println("Case " + (k+1) + ": " +array[k]);
		}
	}
}

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

#include <iostream>
int main() {
  int c, x;
  for (c=0; 1; ) {
    std::cin >> x;
    if (!x) break;
    std::cout << "Case " << ++c << ": " << x << std::endl;
  }
  return 0;
}

Compiler output:
Main.java:1: error: illegal character: '#'
#include <iostream>
^
Main.java:5: error: not a statement
    std::cin >> x;
             ^
Main.java:7: error: not a statement
    std::cout << "Case " << ++c << ": " << x << std::endl;
                                             ^
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
#include <iostream>
         ^
  (use --enable-preview to enable unnamed classes)
4 errors
Language: Java

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int b =1;
		while(sc.hasNext()){
			int a = sc.nextInt();
			System.out.println("Case "+ b+": "+ a);
			b++;
		}
	}
}

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

public class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int b =1;
		while(sc.hasNext()){
			int a = sc.nextInt();
			System.out.println("Case "+ b+": "+ a);
			b++;
		}
	}
}

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){
  public static final int N =100; 
  int x[N];
   Scanner sc=new Scanner(System.in);
   for(i=0;x[i]!=0;i++){
    x[i]=sc.nextInt();
    if(x[i]!=0)
     System.out.println("Case "+i+": "+x[i]);
    }
  }
}

Compiler output:
Main.java:5: error: illegal start of expression
  public static final int N =100; 
  ^
Main.java:6: error: ']' expected
  int x[N];
        ^
Main.java:6: error: <identifier> expected
  int x[N];
         ^
Main.java:8: error: illegal start of type
   for(i=0;x[i]!=0;i++){
   ^
Main.java:8: error: <identifier> expected
   for(i=0;x[i]!=0;i++){
        ^
Main.java:8: error: ']' expected
   for(i=0;x[i]!=0;i++){
             ^
Main.java:8: error: ';' expected
   for(i=0;x[i]!=0;i++){
              ^
Main.java:8: error: <identifier> expected
   for(i=0;x[i]!=0;i++){
                    ^
Main.java:14: error: class, interface, enum, or record expected
}
^
9 errors
Language: Java

import java.util.Scanner;

public static final int N =100; 

 public class Print{
  public static void main(String[] args){
  int x[N];
   Scanner sc=new Scanner(System.in);
   for(i=0;x[i]!=0;i++){
    x[i]=sc.nextInt();
    if(x[i]!=0)
     System.out.println("Case "+i+": "+x[i]);
    }
  }
}

Compiler output:
Main.java:3: error: unnamed classes are a preview feature and are disabled by default.
public static final int N =100; 
                    ^
  (use --enable-preview to enable unnamed classes)
Main.java:7: error: ']' expected
  int x[N];
        ^
Main.java:7: error: ';' expected
  int x[N];
         ^
3 errors
Language: Java

import java.util.Scanner;

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

Compiler output:
Main.java:5: error: illegal start of expression
  static int N =100; 
  ^
Main.java:6: error: ']' expected
  int x[N];
        ^
Main.java:6: error: <identifier> expected
  int x[N];
         ^
Main.java:8: error: illegal start of type
   for(i=0;x[i]!=0;i++){
   ^
Main.java:8: error: <identifier> expected
   for(i=0;x[i]!=0;i++){
        ^
Main.java:8: error: ']' expected
   for(i=0;x[i]!=0;i++){
             ^
Main.java:8: error: ';' expected
   for(i=0;x[i]!=0;i++){
              ^
Main.java:8: error: <identifier> expected
   for(i=0;x[i]!=0;i++){
                    ^
Main.java:14: error: class, interface, enum, or record expected
}
^
9 errors
Language: Java

import java.util.Scanner;

 public class Print{
  public static void main(String[] args){ 
  int x[100];
   Scanner sc=new Scanner(System.in);
   for(i=0;x[i]!=0;i++){
    x[i]=sc.nextInt();
    if(x[i]!=0)
     System.out.println("Case "+i+": "+x[i]);
    }
  }
}

Compiler output:
Main.java:5: error: ']' expected
  int x[100];
        ^
1 error
Language: Java

import java.util.Scanner;

 public class Print{
  public static void main(String[] args){ 
  int[] x= new int[100];
   Scanner sc=new Scanner(System.in);
   for(i=0;x[i]!=0;i++){
    x[i]=sc.nextInt();
    if(x[i]!=0)
     System.out.println("Case "+i+": "+x[i]);
    }
  }
}

Compiler output:
Main.java:3: error: class Print is public, should be declared in a file named Print.java
 public class Print{
        ^
Main.java:7: error: cannot find symbol
   for(i=0;x[i]!=0;i++){
       ^
  symbol:   variable i
  location: class Print
Main.java:7: error: cannot find symbol
   for(i=0;x[i]!=0;i++){
             ^
  symbol:   variable i
  location: class Print
Main.java:7: error: cannot find symbol
   for(i=0;x[i]!=0;i++){
                   ^
  symbol:   variable i
  location: class Print
Main.java:8: error: cannot find symbol
    x[i]=sc.nextInt();
      ^
  symbol:   variable i
  location: class Print
Main.java:9: error: cannot find symbol
    if(x[i]!=0)
         ^
  symbol:   variable i
  location: class Print
Main.java:10: error: cannot find symbol
     System.out.println("Case "+i+": "+x[i]);
                                ^
  symbol:   variable i
  location: class Print
Main.java:10: error: cannot find symbol
     System.out.println("Case "+i+": "+x[i]);
                                         ^
  symbol:   variable i
  location: class Print
8 errors
Language: Java

import java.util.Scanner;

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

Compiler output:
Main.java:7: error: cannot find symbol
   for(i=0;x[i]!=0;i++){
       ^
  symbol:   variable i
  location: class Main
Main.java:7: error: cannot find symbol
   for(i=0;x[i]!=0;i++){
             ^
  symbol:   variable i
  location: class Main
Main.java:7: error: cannot find symbol
   for(i=0;x[i]!=0;i++){
                   ^
  symbol:   variable i
  location: class Main
Main.java:8: error: cannot find symbol
    x[i]=sc.nextInt();
      ^
  symbol:   variable i
  location: class Main
Main.java:9: error: cannot find symbol
    if(x[i]!=0)
         ^
  symbol:   variable i
  location: class Main
Main.java:10: error: cannot find symbol
     System.out.println("Case "+i+": "+x[i]);
                                ^
  symbol:   variable i
  location: class Main
Main.java:10: error: cannot find symbol
     System.out.println("Case "+i+": "+x[i]);
                                         ^
  symbol:   variable i
  location: class Main
7 errors
Language: Java

import java.util.Scanner;

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

Compiler output:
Main.java:7: error: cannot find symbol
   for(i=0;x[i]!=0&&i<100;i++){
       ^
  symbol:   variable i
  location: class Main
Main.java:7: error: cannot find symbol
   for(i=0;x[i]!=0&&i<100;i++){
             ^
  symbol:   variable i
  location: class Main
Main.java:7: error: cannot find symbol
   for(i=0;x[i]!=0&&i<100;i++){
                    ^
  symbol:   variable i
  location: class Main
Main.java:7: error: cannot find symbol
   for(i=0;x[i]!=0&&i<100;i++){
                          ^
  symbol:   variable i
  location: class Main
Main.java:8: error: cannot find symbol
    x[i]=sc.nextInt();
      ^
  symbol:   variable i
  location: class Main
Main.java:9: error: cannot find symbol
    if(x[i]!=0)
         ^
  symbol:   variable i
  location: class Main
Main.java:10: error: cannot find symbol
     System.out.println("Case "+i+": "+x[i]);
                                ^
  symbol:   variable i
  location: class Main
Main.java:10: error: cannot find symbol
     System.out.println("Case "+i+": "+x[i]);
                                         ^
  symbol:   variable i
  location: class Main
8 errors
Language: Java

import java.util.Scanner;

 public class Main{
  public static void main(String[] args){ 
  int[] x= new int[100];
  int i=0;
  int j;
   Scanner sc=new Scanner(System.in);
  x[0]=sc.nextInt();
   for(i=1;x[i-1]!=0&&i<100;i++){
    x[i]=sc.nextInt();
    j=i+1;
    }
  int k;
   for(k=0;k<i;k++){
    System.out.println("Case "+(k+1)+": "+x[k]);
  }
}

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

import java.util.Scanner;

 public class Print{
  public static void main(String[] args){ 
  int[] x= new int[100];
  int i=0;
  int j;
   Scanner sc=new Scanner(System.in);
  x[0]=sc.nextInt();
   for(i=1;x[i-1]!=0&&i<100;i++){
    x[i]=sc.nextInt();
    j=i+1;
    }
  int k;
   for(k=0;k<i;k++){
    System.out.println("Case "+(k+1)+": "+x[k]);
    }
  }
}

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

import java.util.Scanner;

 public class Print{
  public static void main(String[] args){ 
  int[] x= new int[100];
  int i=0;
  int j;
   Scanner sc=new Scanner(System.in);
  x[0]=sc.nextInt();
   for(i=1;x[i-1]!=0&&i<100;i++){
    x[i]=sc.nextInt();
    j=i+1;
    }
  int k;
   for(k=0;k<i-1;k++){
    System.out.println("Case "+(k+1)+": "+x[k]);
    }
  }
}

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

import java.util.Scanner;

 public class Print{
  public static void main(String[] args){ 
  int[] x= new int[10000000];
  int i=0;
  int j;
   Scanner sc=new Scanner(System.in);
  x[0]=sc.nextInt();
   for(i=1;x[i-1]!=0;i++){
    x[i]=sc.nextInt();
    j=i+1;
    }
  int k;
   for(k=0;k<i-1;k++){
    System.out.println("Case "+(k+1)+": "+x[k]);
    }
  }
}

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

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

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

Compiler output:
Main.java:9: error: incompatible types: int cannot be converted to String
      if (Integer.parseInt(sc.nextInt()) == 0) break;
                                     ^
Main.java:10: error: incompatible types: int cannot be converted to String
      System.println("Case " + i + " " + Integer.parseInt(sc.nextInt()));
                                                                    ^
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
2 errors
Language: Java

public 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)
				break;
			System.out.println("Case " + i + ": " + x);
		}
	}
}

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;

class Main{
  public static void main(String[] args){
    int i = 1;
    Scanner num = new Scanner(System.in);
    while(num != 0){
      System.out.println("Case i: x");
      i++;
    }
  }
}

Compiler output:
Main.java:7: error: bad operand types for binary operator '!='
    while(num != 0){
              ^
  first type:  Scanner
  second type: int
1 error
Language: Java

import java.util.Scanner;

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

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

import java.util.Scanner;

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

Compiler output:
Main.java:8: error: ';' expected
      int num = sc.nextInt()
                            ^
1 error
Language: Java

import java.util.Scanner;

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

Compiler output:
Main.java:7: error: cannot find symbol
    while(num != 0){
          ^
  symbol:   variable num
  location: class Main
1 error
Language: Java

import java.util.Scanner;
import java.io.*;

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

Compiler output:
Main.java:8: error: cannot find symbol
    while(num != 0){
          ^
  symbol:   variable num
  location: class Main
1 error
Language: Java

import java.util.Scanner;

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

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

import java.util.Sanner;

public 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){
     break;
   }
   else{
    System.out.printf("Case %d: %d",i,x);
   }
  } 
 }
}


   

Compiler output:
Main.java:9: error: ';' expected
   int x - sc.nextInt();
        ^
1 error
Language: Java

import java.util.Sanner;

public 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){
     break;
   }
   else{
    System.out.printf("Case %d: %d",i,x);
   }
  } 
 }
}


   

Compiler output:
Main.java:1: error: cannot find symbol
import java.util.Sanner;
                ^
  symbol:   class Sanner
  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
3 errors
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 x = sc.nextInt();

   if(x=0){
     break;
   }
   else{
    System.out.printf("Case %d: %d",i,x);
   }
  } 
 }
}


   

Compiler output:
Main.java:11: error: incompatible types: int cannot be converted to boolean
   if(x=0){
       ^
1 error
Language: Java

import java.util.Scanner;

public class Main_10006 {
	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.printf("Case %d: %d\n", i, x);
			} else if (x == 0) {
				break;
			}
		}
	}
}

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

import java.util.Scanner;

public class lesson2_1 {
	public static void main(String[] args) {
		int i, j = 1;
		Scanner sc = new Scanner(System.in);
		do {
			i = sc.nextInt();
			if (i != 0) {
				System.out.println("Case " + j + ": " + i);
				j++;
			}
		} while (i != 0);
	}
}

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

import java.util.Scanner;

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

Compiler output:
Main.java:3: 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(String[] args){
		Scanner sc=new Scanner(System.in);
		for(int i=1;;i++){
			int x=sc.nextInt();
			System.out.println("Case %d: %d",i,x);
			
		}
	}		
}

Compiler output:
Main.java:7: error: no suitable method found for println(String,int,int)
			System.out.println("Case %d: %d",i,x);
			          ^
    method PrintStream.println() is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(boolean) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(char) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(int) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(long) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(float) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(double) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(char[]) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(String) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(Object) is not applicable
      (actual and formal argument lists differ in length)
1 error