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

import java.io.*;

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

  String[] str=br.readLine();

  for(int i=test.length-1;i>=0;i--){
   System.out.print(str[i]);
  }
  System.out.print("\n");
 }
}

Compiler output:
Main.java:9: error: incompatible types: String cannot be converted to String[]
  String[] str=br.readLine();
                          ^
Main.java:11: error: cannot find symbol
  for(int i=test.length-1;i>=0;i--){
            ^
  symbol:   variable test
  location: class Main
2 errors
Language: Java

import java.io.*;

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

  char[] str=br.readLine();

  for(int i=test.length-1;i>=0;i--){
   System.out.print(str[i]);
  }
  System.out.print("\n");
 }
}

Compiler output:
Main.java:9: error: incompatible types: String cannot be converted to char[]
  char[] str=br.readLine();
                        ^
Main.java:11: error: cannot find symbol
  for(int i=test.length-1;i>=0;i--){
            ^
  symbol:   variable test
  location: class Main
2 errors
Language: Java

public class StringReverse {
 
  public static void main(String args[]){
    String strOriginal = "abcd123d";
    System.out.println(strOriginal);
   
   
    strOriginal = new StringBuffer(strOriginal).reverse().toString();
       
    System.out.println(strOriginal);
  }
 
}

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

import java.io.*;
public class Converstion
{
public static void main(String [] args) throws IOException
{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); 
System.out.println("Enter the string");
String s = br.readLine();
int i,l;
char ch;
l=s.length();
for(i=0;i<l;i++)
{
ch=s.charAt(i);
if(Character.isUpperCase(ch))
System.out.print(Character.toLowerCase(ch));
else if(Character.isLowerCase(ch))
System.out.print(Character.toUpperCase(ch));
else
System.out.print(ch);
}
}
}

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

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


class Main{
    public static void main(String[] a){
        BufferedReader br  = new BufferedReader(new InputStreamReader(System.in));
		String str = br.readLine();
		StringBuffer str1 = new StringBuffer("");
		if(str != null && !str.isEmpty()) {
			int l =str.length();
			for(int i=l-1;i>=0;i--) {
				System.out.print(str.charAt(i));
			}
			
		}
    }
}

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

public class StringReverseExample1{
   public static void main(String[] args){
      String string="abcdef";
      String reverse = new StringBuffer(string).
      reverse().toString();
      System.out.println("\nString before reverse:
      "+string);
      System.out.println("String after reverse:
      "+reverse);
   }
}

Compiler output:
Main.java:6: error: unclosed string literal
      System.out.println("\nString before reverse:
                         ^
Main.java:7: error: unclosed string literal
      "+string);
      ^
Main.java:8: error: unclosed string literal
      System.out.println("String after reverse:
                         ^
Main.java:9: error: unclosed string literal
      "+reverse);
      ^
4 errors
Language: Java

class Main{
    public static void main(String[] a){
File file = new File("reverse.txt");
		
		try {
			Scanner input = new Scanner(file);
			String OrigWord = input.nextLine();
			int OrigLen = OrigWord.length(); 
			String NewWord = "";
			for (int x=OrigLen-1; x >= 0; x--){
				
				NewWord = NewWord + (OrigWord.charAt(x)); 
				
			}
			
			
			System.out.println(NewWord);
		}
		catch (IOException ex) {
			System.out.println(ex);
			}

    }
}

Compiler output:
Main.java:3: error: cannot find symbol
File file = new File("reverse.txt");
^
  symbol:   class File
  location: class Main
Main.java:3: error: cannot find symbol
File file = new File("reverse.txt");
                ^
  symbol:   class File
  location: class Main
Main.java:6: error: cannot find symbol
			Scanner input = new Scanner(file);
			^
  symbol:   class Scanner
  location: class Main
Main.java:6: error: cannot find symbol
			Scanner input = new Scanner(file);
			                    ^
  symbol:   class Scanner
  location: class Main
Main.java:19: error: cannot find symbol
		catch (IOException ex) {
		       ^
  symbol:   class IOException
  location: class Main
5 errors
Language: Java

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

class Main{
    public static void main(String[] a){
Scanner file = new Scanner("System.in");
		
		try {
			Scanner input = new Scanner(file);
			String OrigWord = input.nextLine();
			int OrigLen = OrigWord.length(); 
			String NewWord = "";
			for (int x=OrigLen-1; x >= 0; x--){
				
				NewWord = NewWord + (OrigWord.charAt(x)); 
				
			}
			
			
			System.out.println(NewWord);
		}
		catch (IOException ex) {
			System.out.println(ex);
			}
    }
}

Compiler output:
Main.java:10: error: no suitable constructor found for Scanner(Scanner)
			Scanner input = new Scanner(file);
			                ^
    constructor Scanner.Scanner(Readable) is not applicable
      (argument mismatch; Scanner cannot be converted to Readable)
    constructor Scanner.Scanner(InputStream) is not applicable
      (argument mismatch; Scanner cannot be converted to InputStream)
    constructor Scanner.Scanner(File) is not applicable
      (argument mismatch; Scanner cannot be converted to File)
    constructor Scanner.Scanner(Path) is not applicable
      (argument mismatch; Scanner cannot be converted to Path)
    constructor Scanner.Scanner(String) is not applicable
      (argument mismatch; Scanner cannot be converted to String)
    constructor Scanner.Scanner(ReadableByteChannel) is not applicable
      (argument mismatch; Scanner cannot be converted to ReadableByteChannel)
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
1 error
Language: Java

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

class Main{
    public static void main(String[] a){
Scanner file = new Scanner("System.in");
		
		try {
			Scanner input = new Scanner(file);
			String OrigWord = input.nextLine();
			int OrigLen = OrigWord.length(); 
			String NewWord = "";
			for (int x=OrigLen-1; x >= 0; x--){
				
				NewWord = NewWord + (OrigWord.charAt(x)); 
				
			}
			
			
			System.out.println(NewWord);
		}
		catch (IOException ex) {
			System.out.println(ex);
			}
    }
}

Compiler output:
Main.java:2: error: class, interface, enum, or record expected
iimport java.io.File;
^
Main.java:3: error: class, interface, enum, or record expected
import java.io.IOException;
^
Main.java:4: error: class, interface, enum, or record expected
import java.util.Scanner;
^
Main.java:5: error: class, interface, enum, or record expected
import java.io.IOException;
^
Main.java:6: error: class, interface, enum, or record expected
import java.util.Scanner;
^
5 errors
Language: Java

import java.io.File;
import java.io.IOException;
import java.util.Scanner;
 
class Main{
    public static void main(String[] a){
         
        try {
            Scanner input = new Scanner(System.in);
            String OrigWord = input.nextLine();
            int OrigLen = OrigWord.length(); 
            String NewWord = "";
            for (int x=OrigLen-1; x >= 0; x--){
                 
                NewWord = NewWord + (OrigWord.charAt(x)); 
                 
            }
             
             
            System.out.println(NewWord);
        }
        catch (IOException ex) {
            System.out.println(ex);
            }
    }
}

Compiler output:
Main.java:22: error: exception IOException is never thrown in body of corresponding try statement
        catch (IOException ex) {
        ^
1 error
Language: Java

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

class Main{
    public static void main(String[] a){
		try {
			Scanner input = new Scanner(System.in);
			String OrigWord = input.nextLine();
			int OrigLen = OrigWord.length(); 
			String NewWord = "";
			for (int x=OrigLen-1; x >= 0; x--){
				
				NewWord = NewWord + (OrigWord.charAt(x)); 
				
			}
			
			
			System.out.println(NewWord);
		}
		
    }
}

Compiler output:
Main.java:7: error: 'try' without 'catch', 'finally' or resource declarations
		try {
		^
1 error
Language: Java

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

public class ReverseSequence {

	public static void main(String[] args) throws IOException{
		BufferedReader br = new BufferedReader (new InputStreamReader (System.in));
		String chain=br.readLine();
		String invertChain="";
		
		for(int i=chain.length()-1; i>=0;i--){
			invertChain = invertChain + chain.charAt(i);
		}
		System.out.print(invertChain);
	}
}

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

import java.io.InputStreamReader;
import java.io.BufferedReader;
import java.lang.StringBuilder;

public class Main {
  public static void main(String args[] ) {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    String str = br.readLine();
    StringBuilder sb = new StringBuilder(str);

    System.out.println(sb.reverse());
  }
}

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

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

public class ReverseSequence {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str = br.readLine();
		char[] data = str.toCharArray();

		char buf;
		for (int i = 0; i < data.length / 2; i++) {
			buf = data[i];
			data[i] = data[data.length - 1 - i];
			data[data.length - 1 - i] = buf;
		}
		System.out.println(data);
	}

}

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

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

public class Reverse {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str = br.readLine();
		String[] chara = str.split("", 0);
		int length = chara.length;
		for (int i = 0; i <= length / 2; i++) {
			int j = length - i - 1;
			if (i >= j) {
				break;
			}
			String temporary = chara[i];
			chara[i] = chara[j];
			chara[j] = temporary;
		}
		for (String charac : chara) {
			System.out.print(charac);
		}
		System.out.println();
	}
}

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

import java.util.*;

public class Main {
    public static void main(String[] args) {
        // ???????????????????¨??????§
        // Let's ?????£??¬????????????
        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();
        System.out.println(line.reverse());
    }
}

Compiler output:
Main.java:9: error: cannot find symbol
        System.out.println(line.reverse());
                               ^
  symbol:   method reverse()
  location: variable line of type String
1 error
Language: Java

import java.util.*;

public class Main{
	private static final Scanner scan = new Scanner(System.in);

	public static void main(String[] args){
		String str = scan.next();
		for(int i = str.length - 1; i >= 0; i--){
			char ch = str.charAt(i);
			System.out.printf("%c", ch);
		}
		System.out.printf("\n");
	}
}

Compiler output:
Main.java:8: error: cannot find symbol
		for(int i = str.length - 1; i >= 0; i--){
		               ^
  symbol:   variable length
  location: variable str of type String
1 error
Language: Java

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

public class Main{
    public static void main(String[] args) throws IOException{
	BufferReader br = new BufferReader(new InputStreamReader(System.in));
	String line ="";
	while((line =br.readLine()) != null&&!line.isEmpty()){
	    char[] str=line.toCharArray();
	    char c;
	    int u;
	    for(int i=0;i<str.length/2;i++){
		c=str[i];
		u=str.length-i-1;
		str[i]=str[u];
		str[u]=c;
	    }
	    System.out.println(str);
	}
    }
}

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

import java.io.*;

public class Main{
    public static void main(String[] args) throws IOException{
	BufferReader br = new BufferReader(new InputStreamReader(System.in));
	string line;
	while((line=br.readLine()) != null){
	    StringBuffer sb = new StringBuffer().append(line);
	System.out.print(sb.reverse()+"\n");
	}
    }
}

Compiler output:
Main.java:5: error: cannot find symbol
	BufferReader br = new BufferReader(new InputStreamReader(System.in));
	^
  symbol:   class BufferReader
  location: class Main
Main.java:5: error: cannot find symbol
	BufferReader br = new BufferReader(new InputStreamReader(System.in));
	                      ^
  symbol:   class BufferReader
  location: class Main
Main.java:6: error: cannot find symbol
	string line;
	^
  symbol:   class string
  location: class Main
3 errors
Language: Java

import java.util.Scanner;
public class ReverseSequence {
    public static void main(String[] args) {
        try (Scanner scan = new Scanner(System.in)) {
            StringBuffer str = new StringBuffer(scan.nextLine());
            System.out.println(str.reverse());
        } catch (Exception e) {
            System.exit(0);
        }
    }
}

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

import java.util.Scanner;

public class Reverse {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		StringBuffer sb = new StringBuffer(sc.nextLine());
		System.out.println(sb.reverse());
		sc.close();
	}

}

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

import java.util.Scanner;
class Main{
    public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String line=sc.nextLine();
    for(int i=line.length()-1; i>=0; i--){
    System.out.print(line.charAt(i);
    }
   }
    

Compiler output:
Main.java:7: error: ')' or ',' expected
    System.out.print(line.charAt(i);
                                   ^
Main.java:9: error: reached end of file while parsing
   }
    ^
2 errors
Language: Java

import java.util.*;


public class aoj0006 {
	public static void main(String[] args){
	
		Scanner sc = new Scanner(System. in);
		String line = sc.nextLine();
		char[] str = line.toCharArray();
		
		char[] rts = new char[20];
		
		for(int i=0;i<20;i++){
			str[20-i]=rts[i];
		}
		
		for(int i=0;i<20;i++){
		System.out.print(rts[i]);
		}
	}
}




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

import java.util.*;


public class aoj0006 {
	public static void main(String[] args){
	
		Scanner sc = new Scanner(System. in);
		String line = sc.nextLine();
		char[] str = line.toCharArray();
		int n = line.length();
				
		char[] rts = new char[20];
		
		for(int i=0;i<n;i++){
			rts[i]=str[n-i-1];
		}
		
		for(int i=0;i<n;i++){
		System.out.print(rts[i]);
		}
	}
}




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

import java.util.*;class _{void main(){System.out.println(new StringBuffer(new Scanner(System.in).next()).reverse());}

Compiler output:
Main.java:1: error: as of release 9, '_' is a keyword, and may not be used as an identifier
import java.util.*;class _{void main(){System.out.println(new StringBuffer(new Scanner(System.in).next()).reverse());}
                         ^
Main.java:1: error: reached end of file while parsing
import java.util.*;class _{void main(){System.out.println(new StringBuffer(new Scanner(System.in).next()).reverse());}
                                                                                                                      ^
2 errors
Language: Java

package p1;
import java.util.Scanner;


public class Main 
{

	/**
	 * @param args
	 */
	public static void main(String[] args) 
	{
		// TODO ツ篠ゥツ督ョツ青カツ青ャツつウツづェツつスツδソツッツドツ・ツスツタツブ

		Scanner sc = new Scanner(System.in);
		System.out.println(sc.next().reverse());
	}
}

Compiler output:
Main.java:16: error: cannot find symbol
		System.out.println(sc.next().reverse());
		                            ^
  symbol:   method reverse()
  location: class String
1 error
Language: Java

class Main{
public static void main(String[] args)
			throws java.io.IOException{
		reverse();

		// TODO 自動生成されたメソッド・スタブ
		
	}
	
	public static void reverse()throws IOException{
		BufferedReader input =
	            new BufferedReader (new InputStreamReader (System.in));
		String str = input.readLine();
		String[] strs =str.split("\\B"); //文字列を文字単位に分割
		String restr="";

		for(int i=(strs.length) - 1;i>=0;i--){
			restr+=strs[i]; //逆順に再結合
		}
		System.out.println( restr);

	}}

Compiler output:
Main.java:10: error: cannot find symbol
	public static void reverse()throws IOException{
	                                   ^
  symbol:   class IOException
  location: class Main
Main.java:11: error: cannot find symbol
		BufferedReader input =
		^
  symbol:   class BufferedReader
  location: class Main
Main.java:12: error: cannot find symbol
	            new BufferedReader (new InputStreamReader (System.in));
	                ^
  symbol:   class BufferedReader
  location: class Main
Main.java:12: error: cannot find symbol
	            new BufferedReader (new InputStreamReader (System.in));
	                                    ^
  symbol:   class InputStreamReader
  location: class Main
4 errors
Language: Java

public class Main {
    public static void main(String[] args) throws IOException
    {
        StringBuffer sBuffer = new StringBuffer();
        BufferedReader bReader = 
                new BufferedReader(new InputStreamReader(System.in));
        
        String str = bReader.readLine();
        sBuffer.append(str);
        System.out.println(sBuffer.reverse());
    }
}

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

package Vol000;
import java.util.Scanner;
public class AOJ0_06 
{
	public static void main(String arg[])
	{
		Scanner sc = new Scanner(System.in);
		StringBuilder st=new StringBuilder(sc.next());
		System.out.println(st.reverse());
	}
}

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

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

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

		char[] s = br.readLine().toCharArray();
		
		int N = s.length;
		for(int i=0; i<N/2; i++){
			char temp = s[i];
			s[i] = s[N-i-1];
			s[N-i-1] = temp;
		}

		System.out.println(s);
	}
}

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

public class Test
{

    public static String turn(String str)
    {
        StringBuffer sb = new StringBuffer();
        for (int i = str.length() - 1; i >= 0; i--)
        {
            sb.append(str.charAt(i));
        }
        return sb.toString();
    }

    public static void main(String[] args)
    {
        String str = "w32nimda";
        System.out.println(Test.turn(str));
    }

}

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

import java.io.BufferedInputStream;
import java.math.BigDecimal;
import java.util.Scanner;
public class Test
{

    public static String turn(String str)
    {
        StringBuffer sb = new StringBuffer();
        for (int i = str.length() - 1; i >= 0; i--)
        {
            sb.append(str.charAt(i));
        }
        return sb.toString();
    }

    public static void main(String[] args)
    {
        String str = "123456789";
        System.out.println(Test.turn(str));
    }

}

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

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

public class P0006 {
	public static void main(String[] args) throws IOException {
		InputStreamReader is = new InputStreamReader(System.in);
		char[] buf = new char[21];
		while (is.read(buf) != -1) {
		}
		for (int i = buf.length - 1; i >= 0; i--) {
			if (buf[i] != '\u001F')
				System.out.print(buf[i]);
		}
	}
}

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

public class Main {

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

        doStuff();
    }

    public static void doStuff() 
	{
        String s = in.nextLine();
		char[] c = s.toCharArray();
		char[] c2 = new char[c.length];
		for(int i = 0; i < c.length; i++)
		{
			c2[i] = c[c.length - i - 1];
		}
		
		String toRet = new String(c2);
		
		System.out.println(toRet);
    }

    public static void solve() 
	{
    
    }
}

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

import java.io.*;
class Main1
{
   public static void main(String args[]) throws IOException
   {
   System.out.println("文字列を入力");
   BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    String str1 = br.readline();
    StringBuffer str2 = new StringBuffer(str1);
    str2.reverse();
    System.out.println(str1 + "を逆順にすると" + str2 + "となる.");
   }
}

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

import java.util.Scanner;
import java.util.Arrays;
class Main{
public static void main(String[] args){
     Scanner sc = new Scanner(System.in);
       char[] a = sc.next().toArray();
       for(int i = a.length-1;i>=0;i--){
         System.out.print(a[i]);
         System.out.println();
       }
   }
}

Compiler output:
Main.java:6: error: cannot find symbol
       char[] a = sc.next().toArray();
                           ^
  symbol:   method toArray()
  location: class String
1 error
Language: Java


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

import org.apache.log4j.Logger;

public class Main {

	private static final Logger logger = Logger.getLogger(Main.class);

	public static void main(String[] args) throws IOException {
		StringBuilder builder = new StringBuilder();

		InputStreamReader inputStreamReader = new InputStreamReader(System.in);
		BufferedReader bufferedReader = new BufferedReader(inputStreamReader);


		String input = bufferedReader.readLine();
		builder.append(input);
		logger.debug(builder.reverse().toString() );

	}}

Compiler output:
Main.java:6: error: package org.apache.log4j does not exist
import org.apache.log4j.Logger;
                       ^
Main.java:10: error: cannot find symbol
	private static final Logger logger = Logger.getLogger(Main.class);
	                     ^
  symbol:   class Logger
  location: class Main
Main.java:10: error: cannot find symbol
	private static final Logger logger = Logger.getLogger(Main.class);
	                                     ^
  symbol:   variable Logger
  location: class Main
3 errors
Language: Java


import java.io.*;

public class k{
	public static void main(String args[]) throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str1 = br.readLine();
		StringBuffer str = new StringBuffer(str1);
		StringBuffer str2 = new StringBuffer(str).reverse();
		System.out.println(str2);

		}
	}

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

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

public class reverseStr {

    public static void main (String args[]) {
        
		
		try {
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			String line = br.readLine();
			
			if (line.length() <= 20 && line.length() > 0) {
				char[] str = line.toCharArray();
				for (int i = str.length-1; i >= 0; i--) {
					System.out.print(str[i]);
				}
			}else{
				System.exit(1);
			}
		}
		catch (IOException e) {
			e.printStackTrace();
		}
				
    }
}

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

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

public class Vol_0_1 {

    public static void main(String[] arg) throws NumberFormatException, IOException {
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        String line;
        String revLine;
        while ((line = in.readLine()) != null) {
            revLine = "";
            for (int i = line.length() - 1; i >= 0; i--) {
                revLine = revLine + line.charAt(i);
            }
            System.out.println(revLine);
        }
    }

}

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

import java.util.Scanner;


public class Main {

	public int calcGCD(int a_in, int b_in) {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		System.out.println((new StringBuilder(sc.nextLine()).reverse().toString()));

	}
}

Compiler output:
Main.java:7: error: illegal start of expression
	public static void main(String[] args) {
	^
1 error
Language: Java

import java.util.Scanner;


public class AOJ_Volume0006 {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		StringBuffer sb = new StringBuffer(sc.nextLine());
		StringBuffer s = sb.reverse();
		System.out.println(s);
	}
}

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

import java.util.Scanner;

/**
 * Created by Reopard on 2014/05/06.
 */
public class RevSeq {
    public static void main(String args[]) {
        Scanner scanner = new Scanner(System.in);
        String line = scanner.next();
        char tmp[] = line.toCharArray();
        char answer[] = new char[20];
        for(int i = 0; i < tmp.length; i++) answer[i] = tmp[tmp.length-(i+1)];
        line = String.valueOf(answer);
        System.out.println(line);
    }
}

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

22223122312312312a22223122312312312a22223122312312312a22223122312312312a22223122312312312a22223122312312312a22223122312312312a22223122312312312a22223122312312312a22223122312312312a22223122312312312a22223122312312312a22223122312312312a22223122312312312a22223122312312312a22223122312312312a22223122312312312a


Compiler output:
main.c:1:1: error: invalid suffix "a22223122312312312a22223122312312312a22223122312312312a22223122312312312a22223122312312312a22223122312312312a22223122312312312a22223122312312312a22223122312312312a22223122312312312a22223122312312312a22223122312312312a22223122312312312a22223122312312312a22223122312312312a22223122312312312a" on integer constant
    1 | 22223122312312312a22223122312312312a22223122312312312a22223122312312312a22223122312312312a22223122312312312a22223122312312312a22223122312312312a22223122312312312a22223122312312312a22223122312312312a22223122312312312a22223122312312312a22223122312312312a22223122312312312a22223122312312312a22223122312312312a
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
main.c:1:1: error: expected identifier or '(' before numeric constant
Language: C

key = gets.chomp.to_s
n = gets.chomp.to_i
data = []
count = 0

for i in 0..n-1
  data[i] = gets.chomp.to_s
end

for i in 0..n-1
  check = data[i].include?(key)
  if check
    count = count + 1
  end
end

puts count



Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | key = gets.chomp.to_s
      | ^~~
main.c:1:1: error: type defaults to 'int' in declaration of 'key' [-Wimplicit-int]
main.c:1:7: error: 'gets' undeclared here (not in a function)
    1 | key = gets.chomp.to_s
      |       ^~~~
main.c:2:1: error: expected ',' or ';' before 'n'
    2 | n = gets.chomp.to_i
      | ^
main.c:6:10: error: too many decimal points in number
    6 | for i in 0..n-1
      |          ^~~~
main.c:10:10: error: too many decimal points in number
   10 | for i in 0..n-1
      |          ^~~~
Language: C

#include <stdio.h>
#include <string.h>
int main()
{
	char a[25];
	scanf("%[^\n]",a);
	printf("%s\n",strrev(a));
}


Compiler output:
main.c: In function 'main':
main.c:7:23: error: implicit declaration of function 'strrev'; did you mean 'strsep'? [-Wimplicit-function-declaration]
    7 |         printf("%s\n",strrev(a));
      |                       ^~~~~~
      |                       strsep
Language: C

#include<stdio.h>
#include<string.h>
int main()
{
    char a[1000];
    gets(a);
    strrev(a);
    printf("%s\n",a);
    return 0;
}



Compiler output:
main.c: In function 'main':
main.c:6:5: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
    6 |     gets(a);
      |     ^~~~
      |     fgets
main.c:7:5: error: implicit declaration of function 'strrev'; did you mean 'strsep'? [-Wimplicit-function-declaration]
    7 |     strrev(a);
      |     ^~~~~~
      |     strsep
Language: C

#include<string.h>
#include<stdio.h>
int main()
{
    char str[20],i,len;
    gets(str);
    len=strlen(str);
    for(i=len-1;i>=0;i--){
        printf("%c",str[i]);
    }
    return 0;
}



Compiler output:
main.c: In function 'main':
main.c:6:5: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
    6 |     gets(str);
      |     ^~~~
      |     fgets
Language: C

int main(void){
	
	
	char s[21];
	int flag=0;
	
	scanf("%s",s);
	for(int i=20;i>=0;i--){
		if(flag==1){
			printf("%c",s[i]);
		}
		if(s[i]=='\0'){
			flag=1;
			
		}
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    7 |         scanf("%s",s);
      |         ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main(void){
main.c:7:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    7 |         scanf("%s",s);
      |         ^~~~~
main.c:7:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:10:25: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   10 |                         printf("%c",s[i]);
      |                         ^~~~~~
main.c:10:25: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:10:25: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:10:25: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

#include<stdio.h>
#include<string.h>
int main()
{
	char str[20];
	scanf("%s",str);
	strrev(str);
	printf("%s\n",str);
	return 0;

}

Compiler output:
main.c: In function 'main':
main.c:7:9: error: implicit declaration of function 'strrev'; did you mean 'strsep'? [-Wimplicit-function-declaration]
    7 |         strrev(str);
      |         ^~~~~~
      |         strsep
Language: C

#include <stdio.h>

int main(void) {
	char s[20];
	scanf("%s",s);
	int n=strlen(s);
	int i;
	for(i=n-1;i>=0;i--) {
		printf("%c",s[i]);
	}
	prinf("\n");
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:15: error: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]
    6 |         int n=strlen(s);
      |               ^~~~~~
main.c:2:1: note: include '<string.h>' or provide a declaration of 'strlen'
    1 | #include <stdio.h>
  +++ |+#include <string.h>
    2 | 
main.c:6:15: warning: incompatible implicit declaration of built-in function 'strlen' [-Wbuiltin-declaration-mismatch]
    6 |         int n=strlen(s);
      |               ^~~~~~
main.c:6:15: note: include '<string.h>' or provide a declaration of 'strlen'
main.c:11:9: error: implicit declaration of function 'prinf'; did you mean 'printf'? [-Wimplicit-function-declaration]
   11 |         prinf("\n");
      |         ^~~~~
      |         printf
Language: C

#include <stdio.h>

int main(void) {
	char s[20];
	scanf("%s",s);
	int n=strlen(s);
	int i;
	for(i=n-1;i>=0;i--) {
		printf("%c",s[i]);
	}
	printf("\n");
	return 0;

Compiler output:
main.c: In function 'main':
main.c:6:15: error: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]
    6 |         int n=strlen(s);
      |               ^~~~~~
main.c:2:1: note: include '<string.h>' or provide a declaration of 'strlen'
    1 | #include <stdio.h>
  +++ |+#include <string.h>
    2 | 
main.c:6:15: warning: incompatible implicit declaration of built-in function 'strlen' [-Wbuiltin-declaration-mismatch]
    6 |         int n=strlen(s);
      |               ^~~~~~
main.c:6:15: note: include '<string.h>' or provide a declaration of 'strlen'
main.c:12:9: error: expected declaration or statement at end of input
   12 |         return 0;
      |         ^~~~~~
Language: C

using System;
using System.Linq;

namespace _0006
{
    class Program
    {
        static void Main(string[] args)
        {
            string str = Console.ReadLine();
            foreach(char e in str.ToCharArray().Reverse()) {
                Console.Write(e);
            }
            Console.WriteLine();
        }
    }
}

Compiler output:
main.c:1:1: error: unknown type name 'using'
    1 | using System;
      | ^~~~~
main.c:2:1: error: unknown type name 'using'
    2 | using System.Linq;
      | ^~~~~
main.c:2:13: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    2 | using System.Linq;
      |             ^
main.c:4:1: error: unknown type name 'namespace'
    4 | namespace _0006
      | ^~~~~~~~~
main.c:5:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
    5 | {
      | ^
Language: C

#include<stdio.h>
#include<string.h>

int main()
{
    char str[30];
    scanf("%s",&str);
    printf("%s",strrev(str));
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:17: error: implicit declaration of function 'strrev'; did you mean 'strsep'? [-Wimplicit-function-declaration]
    8 |     printf("%s",strrev(str));
      |                 ^~~~~~
      |                 strsep
Language: C

 #include<stdio.h>
#include<conio.h>

void main ()
{
    char str[20],ch[20];
     int i,len=0;
    scanf ("%[^\n]",str);
    for (i=0;str[i]!='\0';i++)
    {
        len++;
    }
    for (i=0;i<len;i++)
    {
        ch[len-1-i]=str[i];
    }
    str[i]='\0';

   for (i=0;i<len;i++)
   {
       printf ("%c", ch[i]);
   }
  getch();
}

Compiler output:
main.c:2:9: fatal error: conio.h: No such file or directory
    2 | #include<conio.h>
      |         ^~~~~~~~~
compilation terminated.
Language: C

#include<stdio.h>
#include<string.h>

int main()
{
    char str[21];
    scanf("%s",&str);
    printf("%s",strrev(str));
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:17: error: implicit declaration of function 'strrev'; did you mean 'strsep'? [-Wimplicit-function-declaration]
    8 |     printf("%s",strrev(str));
      |                 ^~~~~~
      |                 strsep
Language: C

#include<stdio.h>
#include<string.h>
int main()
{
    char x[21];

    while(scanf("%s",x)==1)
        printf("%s\n",strrev(x));

    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:23: error: implicit declaration of function 'strrev'; did you mean 'strsep'? [-Wimplicit-function-declaration]
    8 |         printf("%s\n",strrev(x));
      |                       ^~~~~~
      |                       strsep
Language: C

#include<stdio.h>
#include<string.h>
#include<math.h>
  
  
      
int main(){
 
char a[48],c[48];
int i,j=0;

scanf("%s",str);

for(i=strlen(str)-1;i>=0;i--){
	c[j]=a[i];
	j++;
}

printf("%s",c);

    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:12:12: error: 'str' undeclared (first use in this function)
   12 | scanf("%s",str);
      |            ^~~
main.c:12:12: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
int main()
{
          char str[19];
          char *rev;
          scanf("%s",str);
          rev=strrev(str);
          printf(" %s",rev);
          return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:15: error: implicit declaration of function 'strrev' [-Wimplicit-function-declaration]
    7 |           rev=strrev(str);
      |               ^~~~~~
main.c:7:14: error: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
    7 |           rev=strrev(str);
      |              ^
Language: C

#include<stdio.h>
#include<string.h>
int main()
{
          char str[20];
          char *rev;
          scanf("%s",str);
          rev=strrev(str);
          printf("%s",rev);
          return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:15: error: implicit declaration of function 'strrev'; did you mean 'strsep'? [-Wimplicit-function-declaration]
    8 |           rev=strrev(str);
      |               ^~~~~~
      |               strsep
main.c:8:14: error: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
    8 |           rev=strrev(str);
      |              ^
Language: C

 #include<stdio.h>
#include<string.h>
int main(){
    char str[50];
    char *rev;
    printf("Enter any string : ");
    scanf("%s",str);
    rev = strrev(str);

    printf("Reverse string is : %s",rev);

    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:11: error: implicit declaration of function 'strrev'; did you mean 'strsep'? [-Wimplicit-function-declaration]
    8 |     rev = strrev(str);
      |           ^~~~~~
      |           strsep
main.c:8:9: error: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
    8 |     rev = strrev(str);
      |         ^
Language: C

#include <stdio.h>
#include <string.h>
#define SIZE 20

int main(void){
	char str[SIZE] = {};
	char str_reverse[SIZE] = {};
	char c = {\0};
	int i = 0;
	int j = 0;
	
	i = 0;
	while (( ch = getchar()) != EOF ) {
        str[i] = ch;
		i++;
        if (i >= SIZE - 1){
            break;
        }
    }
	
	j = 0;
	for(i = strlen(str) - 1 ; i > 0; i--){
		str_reverse[j] = str[i];
		j++;
	}
	
	printf("%s", str_reverse);
	
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:19: error: stray '\' in program
    8 |         char c = {\0};
      |                   ^
main.c:13:18: error: 'ch' undeclared (first use in this function); did you mean 'c'?
   13 |         while (( ch = getchar()) != EOF ) {
      |                  ^~
      |                  c
main.c:13:18: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
#include <string.h>
#define SIZE 20

int main(void){
	char str[SIZE] = {};
	char str_reverse[SIZE] = {};
	char ch = {\0};
	int i = 0;
	int j = 0;
	
	i = 0;
	while (( ch = getchar()) != EOF ) {
        str[i] = ch;
		i++;
        if (i >= SIZE - 1){
            break;
        }
    }
	
	j = 0;
	for(i = strlen(str) - 1 ; i > 0; i--){
		str_reverse[j] = str[i];
		j++;
	}
	
	printf("%s", str_reverse);
	
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:20: error: stray '\' in program
    8 |         char ch = {\0};
      |                    ^
Language: C

#include <stdio.h>

int main(){
char a[21];
int i=0;
fgets(a,sizeof(a),stdin);
while (a[i]!=???\n???) {i++;}
for (i=i-1;i>=0;i???) {printf(???%c???,a[i]);}
printf(???\n???);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:14: error: expected expression before '?' token
    7 | while (a[i]!=???\n???) {i++;}
      |              ^
main.c:7:17: error: stray '\' in program
    7 | while (a[i]!=???\n???) {i++;}
      |                 ^
main.c:7:20: warning: trigraph ??) ignored, use -trigraphs to enable [-Wtrigraphs]
    7 | while (a[i]!=???\n???) {i++;}
main.c:7:18: error: 'n' undeclared (first use in this function)
    7 | while (a[i]!=???\n???) {i++;}
      |                  ^
main.c:7:18: note: each undeclared identifier is reported only once for each function it appears in
main.c:8:19: warning: trigraph ??) ignored, use -trigraphs to enable [-Wtrigraphs]
    8 | for (i=i-1;i>=0;i???) {printf(???%c???,a[i]);}
main.c:8:19: error: expected expression before '?' token
    8 | for (i=i-1;i>=0;i???) {printf(???%c???,a[i]);}
      |                   ^
main.c:9:8: error: expected expression before '?' token
    9 | printf(???\n???);
      |        ^
main.c:9:11: error: stray '\' in program
    9 | printf(???\n???);
      |           ^
main.c:9:14: warning: trigraph ??) ignored, use -trigraphs to enable [-Wtrigraphs]
    9 | printf(???\n???);
Language: C

#include <stdio.h>

int main(){
char a[1024];
int i=0;
fgets(a,sizeof(a),stdin);
while (a[i]!=???\n???) {i++;}
for (i=i-1;i>=0;i???) {printf(???%c???,a[i]);}
printf(???\n???);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:14: error: expected expression before '?' token
    7 | while (a[i]!=???\n???) {i++;}
      |              ^
main.c:7:17: error: stray '\' in program
    7 | while (a[i]!=???\n???) {i++;}
      |                 ^
main.c:7:20: warning: trigraph ??) ignored, use -trigraphs to enable [-Wtrigraphs]
    7 | while (a[i]!=???\n???) {i++;}
main.c:7:18: error: 'n' undeclared (first use in this function)
    7 | while (a[i]!=???\n???) {i++;}
      |                  ^
main.c:7:18: note: each undeclared identifier is reported only once for each function it appears in
main.c:8:19: warning: trigraph ??) ignored, use -trigraphs to enable [-Wtrigraphs]
    8 | for (i=i-1;i>=0;i???) {printf(???%c???,a[i]);}
main.c:8:19: error: expected expression before '?' token
    8 | for (i=i-1;i>=0;i???) {printf(???%c???,a[i]);}
      |                   ^
main.c:9:8: error: expected expression before '?' token
    9 | printf(???\n???);
      |        ^
main.c:9:11: error: stray '\' in program
    9 | printf(???\n???);
      |           ^
main.c:9:14: warning: trigraph ??) ignored, use -trigraphs to enable [-Wtrigraphs]
    9 | printf(???\n???);
Language: C

#include <stdio.h>
#include <string>

using namespace std;
int a;
char test[20];
char temp;

int main()
{
	scanf("%s",test);
	for(a=strlen(test)-1;a>=0;a--)
	{
	printf("%c",test[a]);
	}
	return 0; 
}

Compiler output:
main.c:2:10: fatal error: string: No such file or directory
    2 | #include <string>
      |          ^~~~~~~~
compilation terminated.
Language: C

#include <stdio.h>

int main(void){

    char[20] input;
    scanf("%s", input);

    int i;
    for(i=0; ; i++){
        if( input[i] == '\0' )break;
    }
    for(i--; 0<=i; i--){
        printf("%c", input[i];
    }

    printf("\n");
}

Compiler output:
main.c: In function 'main':
main.c:5:9: error: expected identifier or '(' before '[' token
    5 |     char[20] input;
      |         ^
main.c:6:17: error: 'input' undeclared (first use in this function); did you mean 'int'?
    6 |     scanf("%s", input);
      |                 ^~~~~
      |                 int
main.c:6:17: note: each undeclared identifier is reported only once for each function it appears in
main.c:13:30: error: expected ')' before ';' token
   13 |         printf("%c", input[i];
      |               ~              ^
      |                              )
main.c:13:31: error: expected ';' before '}' token
   13 |         printf("%c", input[i];
      |                               ^
      |                               ;
   14 |     }
      |     ~
Language: C

#include <stdio.h>
#define INPUT_MAX 21
 
int main(void){
 
    char input[INPUT_MAX];
    scanf("%s", input);
 
    int i;
    for(i=0; i<INPUT_MAX-1; i++){
        if( input[i] == '\0' ) break;
    }
    for(i--; 0<=i; i--){
        printf("%c", input[i];
    }
 
    printf("\n");
}

Compiler output:
main.c: In function 'main':
main.c:14:30: error: expected ')' before ';' token
   14 |         printf("%c", input[i];
      |               ~              ^
      |                              )
main.c:14:31: error: expected ';' before '}' token
   14 |         printf("%c", input[i];
      |                               ^
      |                               ;
   15 |     }
      |     ~
Language: C

#include<stdio.h>

int main(void){
	char str[21];
	int i;

	scanf("%s",str);

	for(i=20,i>=0;i--){
		printf("%c"str[i]);
			}
		printf("\n");

}

Compiler output:
main.c: In function 'main':
main.c:9:26: error: expected ';' before ')' token
    9 |         for(i=20,i>=0;i--){
      |                          ^
      |                          ;
main.c:10:28: error: expected ')' before 'str'
   10 |                 printf("%c"str[i]);
      |                       ~    ^~~
      |                            )