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

import java.io.*;

public class Main{
	public static void main(String[] args){
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();
		while(true){
			String str = (br.readline()).split(" ");
			if (str[1] == "?") {
				break;
			}
			String con = str[0] + str[1] + str[2];
			int a = Integer.parseInt(con);
			sb.append(con).append("\n");
		}
		System.out.print(sb);
	}
}

Compiler output:
Main.java:8: error: cannot find symbol
			String str = (br.readline()).split(" ");
			                ^
  symbol:   method readline()
  location: variable br of type BufferedReader
Main.java:9: error: array required, but String found
			if (str[1] == "?") {
			       ^
Main.java:12: error: array required, but String found
			String con = str[0] + str[1] + str[2];
			                ^
Main.java:12: error: array required, but String found
			String con = str[0] + str[1] + str[2];
			                         ^
Main.java:12: error: array required, but String found
			String con = str[0] + str[1] + str[2];
			                                  ^
5 errors
Language: Java

import java.io.*;

public class Main{
	public static void main(String[] args){
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();
		while(true){
			String[] str = (br.readline()).split(" ");
			if (str[1] == "?") {
				break;
			}
			String con = str[0] + str[1] + str[2];
			int a = Integer.parseInt(con);
			sb.append(con).append("\n");
		}
		System.out.print(sb);
	}
}

Compiler output:
Main.java:8: error: cannot find symbol
			String[] str = (br.readline()).split(" ");
			                  ^
  symbol:   method readline()
  location: variable br of type BufferedReader
1 error
Language: Java

import java.io.*;

public class Main{
	public static void main(String[] args){
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		while(true){
			String st = br.readline();
			String[] str = st.split(" ");
			int a = Integer.parseInt(str[0]);
			String op = str[1];
			int b = Integer.parseInt(str[2]);
			if ("?".equals(op)) {
				break;
			}
			if("+".equals(op)){
				System.out.println(a + b);
			}else if("-".equals(op)){
				System.out.println(a - b);
			}else if("*".equals(op)){
				System.out.println(a * b);
			}else if("/".equals(op)){
				System.out.println(a / b);
			}
		}
	}

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

import java.io.*;

public class Main{
	public static void main(String[] args){
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		while(true){
			String st = br.readline();
			String[] str = st.split(" ");
			int a = Integer.parseInt(str[0]);
			String op = str[1];
			int b = Integer.parseInt(str[2]);
			if ("?".equals(op)) {
				break;
			}
			if("+".equals(op)){
				System.out.println(a + b);
			}else if("-".equals(op)){
				System.out.println(a - b);
			}else if("*".equals(op)){
				System.out.println(a * b);
			}else if("/".equals(op)){
				System.out.println(a / b);
			}
		}
	}
}

Compiler output:
Main.java:7: error: cannot find symbol
			String st = br.readline();
			              ^
  symbol:   method readline()
  location: variable br of type BufferedReader
1 error
Language: Java

import java.io.*;

public class Main{
	public static void main(String[] args){
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		while(true){
			String st = br.readLine();
			String[] str = st.split(" ");
			int a = Integer.parseInt(str[0]);
			String op = str[1];
			int b = Integer.parseInt(str[2]);
			if ("?".equals(op)) {
				break;
			}
			if("+".equals(op)){
				System.out.println(a + b);
			}else if("-".equals(op)){
				System.out.println(a - b);
			}else if("*".equals(op)){
				System.out.println(a * b);
			}else if("/".equals(op)){
				System.out.println(a / b);
			}
		}
	}
}

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

import java.io.IOException;
import java.util.Scanner;
import java.lang.String;
public class Main {

	public static void main(String[] args) throws IOException {
		// TODO ?????????????????????????????????????????????
      Scanner sc = new Scanner(System.in);
      int a = sc.nextInt();
      String b = sc.next();
      int c = sc.nextInt();
      int d;
      
      d=0;
      
      if(b.equals("+")){d=a+c;
      System.out.println(d);}
      else if (b.equals("-")){d=a-c;
      System.out.println(d);}
      else if (b.equals("*")){d=a*c;
      System.out.println(d);}
      else if (b.equals("/")){d=a/c;
      System.out.println(d);}
      else {return;}
      
	}

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

import java.util.Scanner;

public class ITP1_4_C {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        boolean end = false;
        while(sc.hasNextLine()){
            String[] str = sc.nextLine().split(" ");
            int a = Integer.parseInt(str[0]);
            int b = Integer.parseInt(str[2]);

            switch(str[1]){
            case "+":
                System.out.println(a + b);
                break;
            case "-":
                System.out.println(a - b);
                break;
            case "*":
                System.out.println(a * b);
                break;
            case "/":
                System.out.println(a / b);
                break;
            case "?":
                end = true;
                break;
            }
            if(end) break;
        }
    }

}

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

public class Main { 
   public static void main(String[] args){
      try(Scanner sc = new Scanner){
	  int a = sc.nextInt();
	  String op = sc.nextInt();
	  int b = sc.nextInt();
          if(op.equals("?")){
              break;
          } else {
             calc(a, op, b);
          }
      } catch (Exception e){
          e.printStackTrace();
      }
   }
  
   private static int calc(int x,String op, int y){
       switch (op) {
	  case "+":
	    int ans = x + y;
	    break;
	  case "-":
	    int ans = x - y;
	    break;
	  case "*":	  	  
	    int ans = x * y;
	    break;
	  case "/":
	    int ans = x / y;
	    break;
	  case default:
	    System.out.println("??????????????¨?????????????????????")
       }
       System.out.println(ans);
   }
}

Compiler output:
Main.java:3: error: '(' or '[' expected
      try(Scanner sc = new Scanner){
                                  ^
Main.java:31: error: default label not allowed here
	  case default:
	       ^
Main.java:32: error: ';' expected
	    System.out.println("????????????????????????????????????")
	                                                              ^
3 errors
Language: Java

import java.util.Scanner;
class Main{
public static void main(String[] args){
Scanner scan= new Scanner();
while(true){
int a=scan.nextInt();
String b=scan.next();
int c=scan.nextInt();
if(b=="?")
break;
if(b=="+"){
System.out.println(a+b);
}
if(b=="-"){
System.out.println(a-b);
}
if(b=="*"){
System.out.println(a*b);
}
if(b=="/"){
System.out.println(a/b);

}

}
}
}

Compiler output:
Main.java:4: error: no suitable constructor found for Scanner(no arguments)
Scanner scan= new Scanner();
              ^
    constructor Scanner.Scanner(Readable,Pattern) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(Readable) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(InputStream) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(InputStream,String) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(InputStream,Charset) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(File) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(File,String) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(File,Charset) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(File,CharsetDecoder) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(Path) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(Path,String) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(Path,Charset) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(String) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(ReadableByteChannel) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(ReadableByteChannel,String) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(ReadableByteChannel,Charset) is not applicable
      (actual and formal argument lists differ in length)
Main.java:15: error: bad operand types for binary operator '-'
System.out.println(a-b);
                    ^
  first type:  int
  second type: String
Main.java:18: error: bad operand types for binary operator '*'
System.out.println(a*b);
                    ^
  first type:  int
  second type: String
Main.java:21: error: bad operand types for binary operator '/'
System.out.println(a/b);
                    ^
  first type:  int
  second type: String
4 errors
Language: Java

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt;
		int op = scan.nextInt;
		int b = scan.nextInt;//????????¶??\???
		if(op == "?"){
			break;
		} else if(op == "+") {
			int x = a + b;
		} else if(op == "-") {
			x = a - b;
		} else if(op == "*") {
			x = a * b;
		} else if(op == "/") {
			x = a / b;			
		}
		System.out.println(x);
	}
}

Compiler output:
Main.java:3: error: cannot find symbol
		Scanner scan = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
		Scanner scan = new Scanner(System.in);
		                   ^
  symbol:   class Scanner
  location: class Main
Main.java:7: error: bad operand types for binary operator '=='
		if(op == "?"){
		      ^
  first type:  int
  second type: String
Main.java:8: error: break outside switch or loop
			break;
			^
Main.java:9: error: bad operand types for binary operator '=='
		} else if(op == "+") {
		             ^
  first type:  int
  second type: String
Main.java:11: error: bad operand types for binary operator '=='
		} else if(op == "-") {
		             ^
  first type:  int
  second type: String
Main.java:12: error: cannot find symbol
			x = a - b;
			^
  symbol:   variable x
  location: class Main
Main.java:13: error: bad operand types for binary operator '=='
		} else if(op == "*") {
		             ^
  first type:  int
  second type: String
Main.java:14: error: cannot find symbol
			x = a * b;
			^
  symbol:   variable x
  location: class Main
Main.java:15: error: bad operand types for binary operator '=='
		} else if(op == "/") {
		             ^
  first type:  int
  second type: String
Main.java:16: error: cannot find symbol
			x = a / b;			
			^
  symbol:   variable x
  location: class Main
Main.java:18: error: cannot find symbol
		System.out.println(x);
		                   ^
  symbol:   variable x
  location: class Main
12 errors
Language: Java

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt;
		int op = scan.nextInt;
		int b = scan.nextInt;//????????¶??\???
		
		if(op == "+") {
			int x = a + b;
		} else if(op == "-") {
			x = a - b;
		} else if(op == "*") {
			x = a * b;
		} else if(op == "/") {
			x = a / b;			
		} else {
			break;
		}
		System.out.println(x);
	}
}

Compiler output:
Main.java:6: error: cannot find symbol
		int a = scan.nextInt;
		            ^
  symbol:   variable nextInt
  location: variable scan of type Scanner
Main.java:7: error: cannot find symbol
		int op = scan.nextInt;
		             ^
  symbol:   variable nextInt
  location: variable scan of type Scanner
Main.java:8: error: cannot find symbol
		int b = scan.nextInt;//???????????\???
		            ^
  symbol:   variable nextInt
  location: variable scan of type Scanner
Main.java:10: error: bad operand types for binary operator '=='
		if(op == "+") {
		      ^
  first type:  int
  second type: String
Main.java:12: error: bad operand types for binary operator '=='
		} else if(op == "-") {
		             ^
  first type:  int
  second type: String
Main.java:13: error: cannot find symbol
			x = a - b;
			^
  symbol:   variable x
  location: class Main
Main.java:14: error: bad operand types for binary operator '=='
		} else if(op == "*") {
		             ^
  first type:  int
  second type: String
Main.java:15: error: cannot find symbol
			x = a * b;
			^
  symbol:   variable x
  location: class Main
Main.java:16: error: bad operand types for binary operator '=='
		} else if(op == "/") {
		             ^
  first type:  int
  second type: String
Main.java:17: error: cannot find symbol
			x = a / b;			
			^
  symbol:   variable x
  location: class Main
Main.java:19: error: break outside switch or loop
			break;
			^
Main.java:21: error: cannot find symbol
		System.out.println(x);
		                   ^
  symbol:   variable x
  location: class Main
12 errors
Language: Java

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt;
		int op = scan.nextInt;
		int b = scan.nextInt; //????????¶??\???
		
		if (op == "+") {
			int x = a + b;
		} else if(op == "-") {
			x = a - b;
		} else if(op == "*") {
			x = a * b;
		} else if(op == "/") {
			x = a / b;			
		} else {
			break;
		}
		System.out.println(x);
	}
}

Compiler output:
Main.java:6: error: cannot find symbol
		int a = scan.nextInt;
		            ^
  symbol:   variable nextInt
  location: variable scan of type Scanner
Main.java:7: error: cannot find symbol
		int op = scan.nextInt;
		             ^
  symbol:   variable nextInt
  location: variable scan of type Scanner
Main.java:8: error: cannot find symbol
		int b = scan.nextInt; //???????????\???
		            ^
  symbol:   variable nextInt
  location: variable scan of type Scanner
Main.java:10: error: bad operand types for binary operator '=='
		if (op == "+") {
		       ^
  first type:  int
  second type: String
Main.java:12: error: bad operand types for binary operator '=='
		} else if(op == "-") {
		             ^
  first type:  int
  second type: String
Main.java:13: error: cannot find symbol
			x = a - b;
			^
  symbol:   variable x
  location: class Main
Main.java:14: error: bad operand types for binary operator '=='
		} else if(op == "*") {
		             ^
  first type:  int
  second type: String
Main.java:15: error: cannot find symbol
			x = a * b;
			^
  symbol:   variable x
  location: class Main
Main.java:16: error: bad operand types for binary operator '=='
		} else if(op == "/") {
		             ^
  first type:  int
  second type: String
Main.java:17: error: cannot find symbol
			x = a / b;			
			^
  symbol:   variable x
  location: class Main
Main.java:19: error: break outside switch or loop
			break;
			^
Main.java:21: error: cannot find symbol
		System.out.println(x);
		                   ^
  symbol:   variable x
  location: class Main
12 errors
Language: Java

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt;
		int op = scan.nextInt;
		int b = scan.nextInt;//????????¶??\???
		
		for (i = 0;; i++){
		if(op == '+') {
			int x = a + b;
		} else if(op == '-') {
			x = a - b;
		} else if(op == '*') {
			x = a * b;
		} else if(op == '/') {
			x = a / b;			
		} else {
			break;
		}
		System.out.println(x);
		}
	}
}

Compiler output:
Main.java:6: error: cannot find symbol
		int a = scan.nextInt;
		            ^
  symbol:   variable nextInt
  location: variable scan of type Scanner
Main.java:7: error: cannot find symbol
		int op = scan.nextInt;
		             ^
  symbol:   variable nextInt
  location: variable scan of type Scanner
Main.java:8: error: cannot find symbol
		int b = scan.nextInt;//???????????\???
		            ^
  symbol:   variable nextInt
  location: variable scan of type Scanner
Main.java:10: error: cannot find symbol
		for (i = 0;; i++){
		     ^
  symbol:   variable i
  location: class Main
Main.java:10: error: cannot find symbol
		for (i = 0;; i++){
		             ^
  symbol:   variable i
  location: class Main
Main.java:14: error: cannot find symbol
			x = a - b;
			^
  symbol:   variable x
  location: class Main
Main.java:16: error: cannot find symbol
			x = a * b;
			^
  symbol:   variable x
  location: class Main
Main.java:18: error: cannot find symbol
			x = a / b;			
			^
  symbol:   variable x
  location: class Main
Main.java:22: error: cannot find symbol
		System.out.println(x);
		                   ^
  symbol:   variable x
  location: class Main
9 errors
Language: Java

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt;
		int op = scan.nextChar;
		int b = scan.nextInt;//????????¶??\???
		
		for (i = 0;; i++){
		if(op == '+') {
			int x = a + b;
		} else if(op == '-') {
			x = a - b;
		} else if(op == '*') {
			x = a * b;
		} else if(op == '/') {
			x = a / b;			
		} else {
			break;
		}
		System.out.println(x);
		}
	}
}

Compiler output:
Main.java:6: error: cannot find symbol
		int a = scan.nextInt;
		            ^
  symbol:   variable nextInt
  location: variable scan of type Scanner
Main.java:7: error: cannot find symbol
		int op = scan.nextChar;
		             ^
  symbol:   variable nextChar
  location: variable scan of type Scanner
Main.java:8: error: cannot find symbol
		int b = scan.nextInt;//???????????\???
		            ^
  symbol:   variable nextInt
  location: variable scan of type Scanner
Main.java:10: error: cannot find symbol
		for (i = 0;; i++){
		     ^
  symbol:   variable i
  location: class Main
Main.java:10: error: cannot find symbol
		for (i = 0;; i++){
		             ^
  symbol:   variable i
  location: class Main
Main.java:14: error: cannot find symbol
			x = a - b;
			^
  symbol:   variable x
  location: class Main
Main.java:16: error: cannot find symbol
			x = a * b;
			^
  symbol:   variable x
  location: class Main
Main.java:18: error: cannot find symbol
			x = a / b;			
			^
  symbol:   variable x
  location: class Main
Main.java:22: error: cannot find symbol
		System.out.println(x);
		                   ^
  symbol:   variable x
  location: class Main
9 errors
Language: Java

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt;
		char op = scan.nextChar;
		int b = scan.nextInt;//????????¶??\???
		
			for (i = 0;; i++){
			if(op == '+') {
				System.out.println(a + b);
			} else if(op == '-') {
				System.out.println(a - b);
			} else if(op == '*') {
				System.out.println(a * b);
			} else if(op == '/') {
				System.out.println(a / b);
			} else {
				break;
			}
		}
	}
}

Compiler output:
Main.java:6: error: cannot find symbol
		int a = scan.nextInt;
		            ^
  symbol:   variable nextInt
  location: variable scan of type Scanner
Main.java:7: error: cannot find symbol
		char op = scan.nextChar;
		              ^
  symbol:   variable nextChar
  location: variable scan of type Scanner
Main.java:8: error: cannot find symbol
		int b = scan.nextInt;//???????????\???
		            ^
  symbol:   variable nextInt
  location: variable scan of type Scanner
Main.java:10: error: cannot find symbol
			for (i = 0;; i++){
			     ^
  symbol:   variable i
  location: class Main
Main.java:10: error: cannot find symbol
			for (i = 0;; i++){
			             ^
  symbol:   variable i
  location: class Main
5 errors
Language: Java

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt;
		String op = scan.next();
		int b = scan.nextInt;//????????¶??\???
		
			for (i = 0;; i++){
			if(op == '+') {
				System.out.println(a + b);
			} else if(op == '-') {
				System.out.println(a - b);
			} else if(op == '*') {
				System.out.println(a * b);
			} else if(op == '/') {
				System.out.println(a / b);
			} else {
				break;
			}
		}
	}
}

Compiler output:
Main.java:6: error: cannot find symbol
		int a = scan.nextInt;
		            ^
  symbol:   variable nextInt
  location: variable scan of type Scanner
Main.java:8: error: cannot find symbol
		int b = scan.nextInt;//???????????\???
		            ^
  symbol:   variable nextInt
  location: variable scan of type Scanner
Main.java:10: error: cannot find symbol
			for (i = 0;; i++){
			     ^
  symbol:   variable i
  location: class Main
Main.java:10: error: cannot find symbol
			for (i = 0;; i++){
			             ^
  symbol:   variable i
  location: class Main
Main.java:11: error: bad operand types for binary operator '=='
			if(op == '+') {
			      ^
  first type:  String
  second type: char
Main.java:13: error: bad operand types for binary operator '=='
			} else if(op == '-') {
			             ^
  first type:  String
  second type: char
Main.java:15: error: bad operand types for binary operator '=='
			} else if(op == '*') {
			             ^
  first type:  String
  second type: char
Main.java:17: error: bad operand types for binary operator '=='
			} else if(op == '/') {
			             ^
  first type:  String
  second type: char
8 errors
Language: Java

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt;
		String op = scan.next();
		int b = scan.nextInt;//????????¶??\???
		
			for ( int i = 0;; i++){
			if(op == '+') {
				System.out.println(a + b);
			} else if(op == '-') {
				System.out.println(a - b);
			} else if(op == '*') {
				System.out.println(a * b);
			} else if(op == '/') {
				System.out.println(a / b);
			} else {
				break;
			}
		}
	}
}

Compiler output:
Main.java:6: error: cannot find symbol
		int a = scan.nextInt;
		            ^
  symbol:   variable nextInt
  location: variable scan of type Scanner
Main.java:8: error: cannot find symbol
		int b = scan.nextInt;//???????????\???
		            ^
  symbol:   variable nextInt
  location: variable scan of type Scanner
Main.java:11: error: bad operand types for binary operator '=='
			if(op == '+') {
			      ^
  first type:  String
  second type: char
Main.java:13: error: bad operand types for binary operator '=='
			} else if(op == '-') {
			             ^
  first type:  String
  second type: char
Main.java:15: error: bad operand types for binary operator '=='
			} else if(op == '*') {
			             ^
  first type:  String
  second type: char
Main.java:17: error: bad operand types for binary operator '=='
			} else if(op == '/') {
			             ^
  first type:  String
  second type: char
6 errors
Language: Java

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		String s[] = new String[3];
		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt;
		s[i] = scan.next();
		int b = scan.nextInt;//????????¶??\???
		
			for ( int i = 0;; i++){
			String op = s[1];
			if(op == '?') {
				break;			
			} else if(op == '+') {
				System.out.println(a + b);
			} else if(op == '-') {
				System.out.println(a - b);
			} else if(op == '*') {
				System.out.println(a * b);
			} else if(op == '/') {
				System.out.println(a / b);
			}
		}
	}
}

Compiler output:
Main.java:7: error: cannot find symbol
		int a = scan.nextInt;
		            ^
  symbol:   variable nextInt
  location: variable scan of type Scanner
Main.java:8: error: cannot find symbol
		s[i] = scan.next();
		  ^
  symbol:   variable i
  location: class Main
Main.java:9: error: cannot find symbol
		int b = scan.nextInt;//???????????\???
		            ^
  symbol:   variable nextInt
  location: variable scan of type Scanner
Main.java:13: error: bad operand types for binary operator '=='
			if(op == '?') {
			      ^
  first type:  String
  second type: char
Main.java:15: error: bad operand types for binary operator '=='
			} else if(op == '+') {
			             ^
  first type:  String
  second type: char
Main.java:17: error: bad operand types for binary operator '=='
			} else if(op == '-') {
			             ^
  first type:  String
  second type: char
Main.java:19: error: bad operand types for binary operator '=='
			} else if(op == '*') {
			             ^
  first type:  String
  second type: char
Main.java:21: error: bad operand types for binary operator '=='
			} else if(op == '/') {
			             ^
  first type:  String
  second type: char
8 errors
Language: Java

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		String s[] = new String[3];
		Scanner scan = new Scanner(System.in);		
			for ( int i = 0;; i++){
			int a = scan.nextInt;
			s[i] = scan.next();
			int b = scan.nextInt;//????????¶??\???
			String op = s[i];
			if(op == '?') {
				break;			
			} else if(op == '+') {
				System.out.println(a + b);
			} else if(op == '-') {
				System.out.println(a - b);
			} else if(op == '*') {
				System.out.println(a * b);
			} else if(op == '/') {
				System.out.println(a / b);
			}
		}
	}
}

Compiler output:
Main.java:8: error: cannot find symbol
			int a = scan.nextInt;
			            ^
  symbol:   variable nextInt
  location: variable scan of type Scanner
Main.java:10: error: cannot find symbol
			int b = scan.nextInt;//???????????\???
			            ^
  symbol:   variable nextInt
  location: variable scan of type Scanner
Main.java:12: error: bad operand types for binary operator '=='
			if(op == '?') {
			      ^
  first type:  String
  second type: char
Main.java:14: error: bad operand types for binary operator '=='
			} else if(op == '+') {
			             ^
  first type:  String
  second type: char
Main.java:16: error: bad operand types for binary operator '=='
			} else if(op == '-') {
			             ^
  first type:  String
  second type: char
Main.java:18: error: bad operand types for binary operator '=='
			} else if(op == '*') {
			             ^
  first type:  String
  second type: char
Main.java:20: error: bad operand types for binary operator '=='
			} else if(op == '/') {
			             ^
  first type:  String
  second type: char
7 errors
Language: Java

mport java.util.Scanner;

public class Main {
	public static void main(String[] args){
		int ans = 0;// ??¨????????????????¨?????????????
		String s[] = new String[3];
		Scanner scan = new Scanner(System.in);

		while(true){//??\???????????£????????°?????????????????????
			for(int i = 0; i < s.length; i++){ //i???s??????????????°????°??????????
				s[i] = scan.next();
			}
			int a = Integer.parseInt(s[0]);//?¨????????????¨????????°??????int
			String op = s[1];			   //????????????String?????????
			int b = Integer.parseInt(s[2]);//?¨????????????¨????????°??????int
			if(op.equals("?")){//??????\???????????????????????°????????????
				break;
			}else if(op.equals("+")){//?????????????????????
				ans=a+b;
				System.out.println(ans);
			}else if(op.equals("-")){
				ans=a-b;
				System.out.println(ans);
			}else if(op.equals("*")){
				ans=a*b;
				System.out.println(ans);
			}else if(op.equals("/")){
				ans=a/b;
				System.out.println(ans);
			}
		}//------------------------------------while
		scan.close();
	}
}

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

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

public class Main {

	public static void main(String[] args) throws IOException{

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String line;
        while ((line = br.readLine()) != null) {
            String[] arr = line.split(" ");
            int a = Integer.parseInt(arr[0]);
            String op = arr[1];
            int b = Integer.parseInt(arr[2]);
            if ("?".equals(op))
                break;
 
            if ("+".equals(op))
                System.out.println(a + b);
            else if ("-".equals(op))
                System.out.println(a - b);
            else if ("*".equals(op))
                System.out.println(a * b);
            else if ("/".equals(op))
                System.out.println(a / b);

	        }

	}

}

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

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

public class Main {

	public static void main(String[] args) throws IOException{
		// TODO ?????????????????????????????????????????????

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String line;
        while ((line = br.readLine()) != null) {
            String[] arr = line.split(" ");
            int a = Integer.parseInt(arr[0]);
            String op = arr[1];
            int b = Integer.parseInt(arr[2]);
            if ("?".equals(op))
                break;
 
            if ("+".equals(op))
                System.out.println(a + b);
            else if ("-".equals(op))
                System.out.println(a - b);
            else if ("*".equals(op))
                System.out.println(a * b);
            else if ("/".equals(op))
                System.out.println(a / b);

	        }

	}

}

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

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

classamain {
	
	public static void main(String[] args) {
		try{
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			String line;
			
			while((line = br.readLine()) != null){
				String[] arr = line.split(" ");
				int a = Integer.parseInt((arr[0]));
				String op = arr[1];
				int b = Integer.parseInt((arr[2]));
				int ans = 0;
				if("?".equals(op)){
					break;
				} else if( op == "+" ){
					ans = a + b;
				} else if ( op == "-" ){
					ans = a - b;
				} else if ( op == "*" ){
					ans = a * b;
				} else if ( op == "/" ){
					ans = a / b;
				} 
				System.out.println(ans);
				}
		}catch(IOException e){
			System.err.println(e);
		}
	}
}

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

import java.util.*;
class Main{
   public static void main(System args[]){
      Scanner stdIn = Scanner(System.in);
      int i = 0;
      while(i){
         int a[i] = stdIn.nextInt();
         String op[i] = stdIn.next();
         int b[i] = stdIn.nextInt();
        
         if(op[i] == "?") break;

         i++;
      }
      
      for(int j = 0, j<i, j++){
         if(op[j] == "+")
            System.out.println(a[j]+b[j]);
       
         else if(op[j] == "-")
            System.out.println(a[j]-b[j]);

         else if(op[j] == "*")
            System.out.println(a[j]*b[j]);

         else if(op[j] == "/")
            System.out.println(a[j]/b[j]);
      }
   }
}

Compiler output:
Main.java:7: error: ']' expected
         int a[i] = stdIn.nextInt();
               ^
Main.java:7: error: ';' expected
         int a[i] = stdIn.nextInt();
                ^
Main.java:8: error: ']' expected
         String op[i] = stdIn.next();
                   ^
Main.java:8: error: ';' expected
         String op[i] = stdIn.next();
                    ^
Main.java:9: error: ']' expected
         int b[i] = stdIn.nextInt();
               ^
Main.java:9: error: ';' expected
         int b[i] = stdIn.nextInt();
                ^
Main.java:16: error: ';' expected
      for(int j = 0, j<i, j++){
                      ^
Main.java:16: error: > or ',' expected
      for(int j = 0, j<i, j++){
                           ^
Main.java:16: error: illegal start of expression
      for(int j = 0, j<i, j++){
                             ^
9 errors
Language: Java

import java.util.*;
class Main{
   public static void main(System args[]){
      Scanner stdIn = Scanner(System.in);
      int i = 0;
      int[] a,b;
      String[] op;
      while(i){
         a[i] = stdIn.nextInt();
         op[i] = stdIn.next();
         b[i] = stdIn.nextInt();

         if(op[i] == "?") break;

         i++;
      }
      
      for(int j = 0, j<i, j++){
         if(op[j] == "+")
            System.out.println(a[j]+b[j]);
       
         else if(op[j] == "-")
            System.out.println(a[j]-b[j]);

         else if(op[j] == "*")
            System.out.println(a[j]*b[j]);

         else if(op[j] == "/")
            System.out.println(a[j]/b[j]);
      }
   }
}

Compiler output:
Main.java:18: error: ';' expected
      for(int j = 0, j<i, j++){
                      ^
Main.java:18: error: > or ',' expected
      for(int j = 0, j<i, j++){
                           ^
Main.java:18: error: illegal start of expression
      for(int j = 0, j<i, j++){
                             ^
3 errors
Language: Java

import java.util.*;
class Main{
   public static void main(System args[]){
      Scanner stdIn = Scanner(System.in);
      int i = 0;
      int[] a,b;
      String[] op;
      while(i){
         a[i] = stdIn.nextInt();
         op[i] = stdIn.next();
         b[i] = stdIn.nextInt();

         if(op[i] == "?") break;

         i++;
      }
      
      for(int j = 0; j<i; j++){
         if(op[j] == "+")
            System.out.println(a[j]+b[j]);
       
         else if(op[j] == "-")
            System.out.println(a[j]-b[j]);

         else if(op[j] == "*")
            System.out.println(a[j]*b[j]);

         else if(op[j] == "/")
            System.out.println(a[j]/b[j]);
      }
   }
}

Compiler output:
Main.java:4: error: cannot find symbol
      Scanner stdIn = Scanner(System.in);
                      ^
  symbol:   method Scanner(InputStream)
  location: class Main
Main.java:8: error: incompatible types: int cannot be converted to boolean
      while(i){
            ^
2 errors
Language: Java

import java.util.*;
class Main{
   public static void main(System args[]){
      Scanner stdIn = new Scanner(System.in);
      int i = 0;
      int[] a,b;
      String[] op;
      while(i){
         a[i] = stdIn.nextInt();
         op[i] = stdIn.next();
         b[i] = stdIn.nextInt();

         if(op[i] == "?") break;

         i++;
      }
      
      for(int j = 0; j<i; j++){
         if(op[j] == "+")
            System.out.println(a[j]+b[j]);
       
         else if(op[j] == "-")
            System.out.println(a[j]-b[j]);

         else if(op[j] == "*")
            System.out.println(a[j]*b[j]);

         else if(op[j] == "/")
            System.out.println(a[j]/b[j]);
      }
   }
}

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

import java.util.*;
class Main{
   public static void main(System args[]){
      Scanner stdIn = new Scanner(System.in);
      int i = 0;
      int[] a,b;
      String[] op;
      while(i == 0){
         a[i] = stdIn.nextInt();
         op[i] = stdIn.next();
         b[i] = stdIn.nextInt();

         if(op[i] == "?") break;

         i++;
      }
      
      for(int j = 0; j<i; j++){
         if(op[j] == "+")
            System.out.println(a[j]+b[j]);
       
         else if(op[j] == "-")
            System.out.println(a[j]-b[j]);

         else if(op[j] == "*")
            System.out.println(a[j]*b[j]);

         else if(op[j] == "/")
            System.out.println(a[j]/b[j]);
      }
   }
}

Compiler output:
Main.java:9: error: variable a might not have been initialized
         a[i] = stdIn.nextInt();
         ^
Main.java:10: error: variable op might not have been initialized
         op[i] = stdIn.next();
         ^
Main.java:11: error: variable b might not have been initialized
         b[i] = stdIn.nextInt();
         ^
Main.java:19: error: variable op might not have been initialized
         if(op[j] == "+")
            ^
Main.java:20: error: variable a might not have been initialized
            System.out.println(a[j]+b[j]);
                               ^
Main.java:20: error: variable b might not have been initialized
            System.out.println(a[j]+b[j]);
                                    ^
Main.java:23: error: variable a might not have been initialized
            System.out.println(a[j]-b[j]);
                               ^
Main.java:23: error: variable b might not have been initialized
            System.out.println(a[j]-b[j]);
                                    ^
Main.java:26: error: variable a might not have been initialized
            System.out.println(a[j]*b[j]);
                               ^
Main.java:26: error: variable b might not have been initialized
            System.out.println(a[j]*b[j]);
                                    ^
Main.java:29: error: variable a might not have been initialized
            System.out.println(a[j]/b[j]);
                               ^
Main.java:29: error: variable b might not have been initialized
            System.out.println(a[j]/b[j]);
                                    ^
12 errors
Language: Java

import java.util.*;
class Main{
   public static void main(System args[]){
      Scanner stdIn = new Scanner(System.in);
      int i = 0;
      int[] a,b;
      String[] op;
      while(1){
         a[i] = stdIn.nextInt();
         op[i] = stdIn.next();
         b[i] = stdIn.nextInt();

         if(op[i] == "?") break;

         i++;
      }
      
      for(int j = 0; j<i; j++){
         if(op[j] == "+")
            System.out.println(a[j]+b[j]);
       
         else if(op[j] == "-")
            System.out.println(a[j]-b[j]);

         else if(op[j] == "*")
            System.out.println(a[j]*b[j]);

         else if(op[j] == "/")
            System.out.println(a[j]/b[j]);
      }
   }
}

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

import java.util.*;
class Main{
   public static void main(System args[]){
      Scanner stdIn = new Scanner(System.in);
      int i,k = 0;
      int[] a,b;
      String[] op;
      while(k == 0){
         a[i] = stdIn.nextInt();
         op[i] = stdIn.next();
         b[i] = stdIn.nextInt();

         if(op[i] == "?") break;

         i++;
      }
      
      for(int j = 0; j<i; j++){
         if(op[j] == "+")
            System.out.println(a[j]+b[j]);
       
         else if(op[j] == "-")
            System.out.println(a[j]-b[j]);

         else if(op[j] == "*")
            System.out.println(a[j]*b[j]);

         else if(op[j] == "/")
            System.out.println(a[j]/b[j]);
      }
   }
}

Compiler output:
Main.java:9: error: variable a might not have been initialized
         a[i] = stdIn.nextInt();
         ^
Main.java:9: error: variable i might not have been initialized
         a[i] = stdIn.nextInt();
           ^
Main.java:10: error: variable op might not have been initialized
         op[i] = stdIn.next();
         ^
Main.java:11: error: variable b might not have been initialized
         b[i] = stdIn.nextInt();
         ^
Main.java:18: error: variable i might not have been initialized
      for(int j = 0; j<i; j++){
                       ^
Main.java:19: error: variable op might not have been initialized
         if(op[j] == "+")
            ^
Main.java:20: error: variable a might not have been initialized
            System.out.println(a[j]+b[j]);
                               ^
Main.java:20: error: variable b might not have been initialized
            System.out.println(a[j]+b[j]);
                                    ^
Main.java:23: error: variable a might not have been initialized
            System.out.println(a[j]-b[j]);
                               ^
Main.java:23: error: variable b might not have been initialized
            System.out.println(a[j]-b[j]);
                                    ^
Main.java:26: error: variable a might not have been initialized
            System.out.println(a[j]*b[j]);
                               ^
Main.java:26: error: variable b might not have been initialized
            System.out.println(a[j]*b[j]);
                                    ^
Main.java:29: error: variable a might not have been initialized
            System.out.println(a[j]/b[j]);
                               ^
Main.java:29: error: variable b might not have been initialized
            System.out.println(a[j]/b[j]);
                                    ^
14 errors
Language: Java

wimport java.util.Scanner;

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

        Scanner sc = new Scanner(System.in); // ??????????????????????????????.

        // ?????????????????? int ?????¨??????????????\???????????????.
        // ??????????????????????????? 0 ????????????.
        while (true) {
            int x = sc.nextInt();
            String op = sc.next();
            int y = sc.nextInt();
            System.out.println(x);
            System.out.println(op);
            System.out.println(y);
            if (op == "?") { break; }
            switch (op) {
            case "+": { System.out.println(x + y); break; }
            case "-": { System.out.println(x - y); break; }
            case "*": { System.out.println(x * y); break; }
            case "/": { System.out.println(x / y); break; }
            }
        }
    }
}

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

import java.util.Scanner;

public class Main {
    public static void main(String[] args){
        int a,b;
        char op;
        Scanner sc = new Scanner(System.in);
        while(true) {
            a = sc.nextInt();
            op = sc.next().charAt(0);
            b = sc.nextInt();
            switch (op) {
                case '+':
                    System.out.println(a+b);
                    break;
                case '-':
                    System.out.println(a-b);
                    break;
                case '*':
                    System.out.println(a*b);
                    break;
                case '/':
                    System.out.println(a/b);
                    break;
                case '?':
                    System.exit(0);
            }
        }
    }

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

import java.io.IOException;
import java.util.Scanner;

class Main {

	public static void main(String[] args) throws IOException {

		Scanner scane = new Scanner(System.in);

		int a = scane.nextInt();
		String str = scane.next();
		int b = scane.nextInt();
/*
		switch (str) {
		case "+":
			System.out.println(a+b);
			break;
		case "-":
			System.out.println(a-b);
			break;
		case "*":
			System.out.println(a*b);
			break;
		case "/":
			System.out.println((int)(a/b));
			break;
		case "?":
			break;
		default:

		}
*/
		if(str.equals("?")){

		}else if(str.equals("+")){
			System.out.println(a+b);
		}else if (str.equals("*")) {
			System.out.println(a*b);
		}else if (str.equals("-")) {
			System.out.println(a-b);
		}else if (str.equals("/")) {
			System.out.println((int)(a/b));
		}

	}

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

import java.util.Scanner;
 
class Main{
  public static void main(String[] arg){
    int a, b, ans;
    String op;
    Scanner in = new Scanner(System.in);
    a = in.nextInt();
    op = in.next();
    b = in.nextInt();

    if("?".equals(op)){
        return;
    }else if("+".equals(op)){
        ans = a + b;
    }else if("-".equals(op)){
        ans = a - b;
    }else if("*".equals(op)){
        ans = a * b;
    }else if("/".equals(op)){
        ans = a / b;
    }

    System.out.println(ans);
  }
}

Compiler output:
Main.java:24: error: variable ans might not have been initialized
    System.out.println(ans);
                       ^
1 error
Language: Java

import java.util.Scanner;
 
class Main{
  public static void main(String[] arg){
    int a, b, ans = 0;
    String op;
    Scanner in = new Scanner(System.in);

    while(true){
        a = in.nextInt();
        op = in.next();
        b = in.nextInt();

        if("?".equals(op)){
            return;
        }else if("+".equals(op)){
            ans = a + b;
        }else if("-".equals(op)){
            ans = a - b;
        }else if("*".equals(op)){
            ans = a * b;
        }else if("/".equals(op)){
            ans = a / b;
        }
    }
    
    System.out.printf("%d\n",ans);
  }
}

Compiler output:
Main.java:27: error: unreachable statement
    System.out.printf("%d\n",ans);
    ^
1 error
Language: Java

import java.util.Scanner;
 
class Main{
  public static void main(String[] arg){
    int a, b, ans = 0;
    String op;
    Scanner in = new Scanner(System.in);

    while(true){
        a = in.nextInt();
        op = in.next();
        b = in.nextInt();

        if("?".equals(op)){
            return;
        }else if("+".equals(op)){
            ans = a + b;
        }else if("-".equals(op)){
            ans = a - b;
        }else if("*".equals(op)){
            ans = a * b;
        }else if("/".equals(op)){
            ans = a / b;
        }
    }

    System.out.println(ans);
  }
}

Compiler output:
Main.java:27: error: unreachable statement
    System.out.println(ans);
    ^
1 error
Language: Java

import java.util.Scanner;
pubric class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		while(true){
			int a = sc.nextInt();
			String op = sc.next();
			int b = sc.nextInt();
			if (op.equals("+")) System.out.println(a + b);
			else if (op.equals("-")) System.out.println(a - b);
			else if (op.equals("*")) System.out.println(a * b);
			else if (op.equals("/")) System.out.println(a / b);
			else if (op.equals("?")) break;
		}
	}
}

Compiler output:
Main.java:2: error: class, interface, enum, or record expected
pubric class Main {
^
1 error
Language: Java

import java.util.Scanner;

class Main {
    public static void main(String args[]) {
        Scanner scan = new Scanner(System.in);
        StringBuilder sb = new StringBuilder();
        
        int answer = 0;

        while (true) {
            int a = scan.nextInt();
            String op = scan.next();
            int b = scan.nextInt();

            if (op.equals("?")) {
                break;
            }

            if (op.equals("+")) {
                answer = a + b;
            } else if (op.equals("-")) {
                answer = a - b;;
            } else if (op.equals("*")) {
                answer = a * b;
            } else if (op.equals("/")) {
                answer = a / b;
            }
            Systeem.out.println(answer)
        }
    }
}

Compiler output:
Main.java:28: error: ';' expected
            Systeem.out.println(answer)
                                       ^
1 error