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

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int[] count = new int[26];
		while(sc.nextLine()) {
			String line = sc.next();
			for(int i=0; i<line.length(); i++) {
				char s = line.charAt(i);
				if(s>='A' && s<='Z') {
					count[s-'A']++;
				} else if(s>='a' && s<='z') {
					count[s-'a']++;
				}
			}
		}
		for(int i=0; i<26; i++) {
			System.out.println((char)('a' + i) + " : " + count[i]);
		}
		sc.close();
	}
}

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

import java.util.Scanner;

public class a {
	public static void main(String[] args) {
	
		Scanner sc = new Scanner(System.in);
		int[] chars = new int[256];
		while ( sc.hasNextLine()){
			String line = sc.nextLine();
			for(int i = 0; i < line.length(); i++){
				char ch = Character.toLowerCase(line.charAt(i));
				chars[ch]++;
				}
			}
			for(char ch = 'a'; ch <= 'z'; ch++) {
			 System.out.println(ch + ":" + chars[ch]);
			 }
			}
		}
	

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

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

public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		char count;
		int i = 0;
		int moji[] = new int[256];
		
		while (sc.hasNextLine()) {
		 	String line = sc.nextLine();
       	    		for (int i= 0; i < line.length(); i++){
			        char ch= Character.toLowerCase(line.charAt(i));
			        chars[ch] = chars[ch] + 1;
 			}
       		}
        
        	for(ch= 'a'; ch <= 'z'; ch++){
	        	System.out.println(count + " : "+ moji[i]);
	        }

	}
}

Compiler output:
Main.java:13: error: variable i is already defined in method main(String[])
       	    		for (int i= 0; i < line.length(); i++){
       	    		         ^
Main.java:15: error: cannot find symbol
			        chars[ch] = chars[ch] + 1;
			        ^
  symbol:   variable chars
  location: class Main
Main.java:15: error: cannot find symbol
			        chars[ch] = chars[ch] + 1;
			                    ^
  symbol:   variable chars
  location: class Main
Main.java:19: error: cannot find symbol
        	for(ch= 'a'; ch <= 'z'; ch++){
        	    ^
  symbol:   variable ch
  location: class Main
Main.java:19: error: cannot find symbol
        	for(ch= 'a'; ch <= 'z'; ch++){
        	             ^
  symbol:   variable ch
  location: class Main
Main.java:19: error: cannot find symbol
        	for(ch= 'a'; ch <= 'z'; ch++){
        	                        ^
  symbol:   variable ch
  location: class Main
6 errors
Language: Java

import java.util.Scanner;

public class Main10020 {
	public static void main(String[] args) {
		// ?¨??????\???????????????????????????????????????
		Scanner sc= new Scanner(System.in);
		int[] chars = new int[256];
		while(sc.hasNextLine()) {
			String line = sc.nextLine();
			for (int i= 0; i< line.length(); i++) {
				char ch= Character.toLowerCase(line.charAt(i));
				// ??? ch???????????????????????????chars????????????????????´??°????????????
				chars[ch]++;
			}
		}
		for(char ch= 'a'; ch<= 'z'; ch++) {
		System.out.println(ch+ " : " + chars[ch]);
		}
	}
}

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

package ????????°???????????°A;

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int alphs[] = new int[1024];
		char ch='.';
		while (true) {
			String line = sc.nextLine();
			for (int i = 0; i < line.length(); i++) {
				ch = Character.toLowerCase(line.charAt(i));
				alphs[ch]++;

			}
			if(ch=='.')
				break;


		}

		for(ch= 'a'; ch<= 'z'; ch++) {
			System.out.println(ch+ " : " + alphs[ch]);
		}
	sc.close();
	}

}

Compiler output:
Main.java:1: error: <identifier> expected
package ?????????????????????A;
       ^
Main.java:1: error: illegal character: '\u00b0'
package ?????????????????????A;
                ^
Main.java:1: error: illegal character: '\u00b0'
package ?????????????????????A;
                            ^
3 errors
Language: Java

import java.util.Scanner;

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

		Scanner sc = new Scanner(System.in);

		int[] chars = new int[256];

		while(sc.hasNextLine()){
			String line = sc.nextLine();
			if(Line==null)break;
			for(int i = 0;i<line.length();i++){
				char ch = Character.toLowerCase(line.charAt(i));
				chars[ch]++;
			}
		}
		for(char ch = 'a';ch<='z';ch++){
			System.out.printf(ch + ":" + chars[ch]);
			System.out.printf("\n");
		}
	}
}

Compiler output:
Main.java:12: error: cannot find symbol
			if(Line==null)break;
			   ^
  symbol:   variable Line
  location: class Main
1 error
Language: Java


import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int[] chars = new int[256];
		while (sc.hasNextLine()) {
			String line = sc.nextLine();
			for (int i = 0; i < line.length(); i++) {
				char ch = Character.toLowerCase(line.charAt(i));
				chars[i] = ch;
			}
		}
???		for (char ch = 'a'; ch <= 'z'; ch++) {
			System.out.println(ch + " : " + chars[ch]);
		}
	}
}

Compiler output:
Main.java:14: error: illegal start of expression
???		for (char ch = 'a'; ch <= 'z'; ch++) {
^
Main.java:14: error: illegal start of expression
???		for (char ch = 'a'; ch <= 'z'; ch++) {
 ^
Main.java:14: error: illegal start of expression
???		for (char ch = 'a'; ch <= 'z'; ch++) {
  ^
Main.java:14: error: illegal start of expression
???		for (char ch = 'a'; ch <= 'z'; ch++) {
   		^
4 errors
Language: Java

import java.util.Scanner;
public class CountingCharacters {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int[] chars = new int[256];
		while (sc.hasNextLine()) {
			String line = sc.nextLine();
			for (int i = 0; i < line.length(); i++) {
				char ch = Character.toLowerCase(line.charAt(i));
				chars[ch]++;
			}
		}
		for (char ch = 'a'; ch <= 'z'; ch++) {
			System.out.println(ch + " : " + chars[ch]);
		}
	}
}

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

import java.util.Scanner;

public class StandardD{
    public static void main(String[] args){
	Scanner sc=new Scanner(System.in);
	while(true){
	    int n=sc.nextInt();
	    if(n==0){
		break;
	    }
	    int [] scores=new int[n];
	    for(int i=0;i<scores.length;i++){
		scores[i]=sc.nextInt();
		}
        int sum=0;
	    double a=0,v=0;
	    for(int j=0;j<scores.length;j++){
            sum=sum+scores[j];}
            a=sum/n;
        for(int j=0;j<n;j++)
            v+=(Math.pow(scores[j]-a,2))/n;
        System.out.println(Math.sqrt(v));
	}
    }
}

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


public class Main {
	public static void main(String[] args) {
		
		Scanner sc= new Scanner(System.in);
		int[] chars = new int[256];
		while(sc.hasNextLine()) {
			String line = sc.nextLine();
			for(int i=0;i<256;i++){
				chars[i]=0;
			}
			for (int i= 0; i< line.length(); i++) {
				char ch= Character.toLowerCase(line.charAt(i));
				chars[ch]++;
			}
		}
		for(char ch= 'a'; ch<= 'z'; ch++) {
			System.out.println(ch+ " : " + chars[ch]);
		}
	}
}

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

package ????????°???????????°A;

import java.util.Scanner;

public class Main {

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

		while (sc.hasNextLine()) {
			String line = sc.nextLine();
			for (int i = 0; i < line.length(); i++) {
			char	ch = Character.toLowerCase(line.charAt(i));
				alphs[ch]++;

			}


		}

		for(char ch= 'a'; ch<= 'z'; ch++) {
			System.out.println(ch+ " : " + alphs[ch]);
		}
	sc.close();
	}

}

Compiler output:
Main.java:1: error: <identifier> expected
package ?????????????????????A;
       ^
Main.java:1: error: illegal character: '\u00b0'
package ?????????????????????A;
                ^
Main.java:1: error: illegal character: '\u00b0'
package ?????????????????????A;
                            ^
3 errors
Language: Java

import java.util.Scanner;

public class Maina {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int[] chars = new int[256];
		while(sc.hasNextLine()) {
			String line = sc.nextLine();
			for(int i = 0; i < line.length(); i++){
				char ch = Character.toLowerCase(line.charAt(i));
				for(char cha = 'a'; cha <= 'z'; cha++){
					if(cha == ch){
						chars[cha]++;
					}
				}
			}
		}
		for(char ch = 'a'; ch <= 'z'; ch++){
			System.out.println(ch + ":" + chars[ch]);
		}
	}
}

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

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

	Scanner sc=new Scanner(System.in);
	int[] chars=new int[256];
	while(sc.hasNextLine()){
	String line=sc.nextLine();
	for(int i =0;i<line.length();i++){
	char ch =Character.toLowerCase(line.charAt(i));
	chars[ch-'a']++;

	}
	for(char ch='a';ch<='z';ch++)
	{
		System.out.println(ch+" : "+chars[ch-'a']);
	}
	}
}
}

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

import java.io.*;

public class Main {
	public static void main(String[] args) throws IOException{
		BufferedReader br = new BufferedReader (new InputStreamReader (System.in));
		String str = br.readLine();
		int i;
		int count[]=new int['z'+1];
		char cha;
		for(i='a';i<='z';i++){
			count[i]=0;
		}
		for(i=0;i<str.length();i++){
			cha = str.charAt(i);
			count[cha]++;
		}
		for(i='a';i<='y';i++){
			System.out.printf("%c : %d\n",i,count[i]);
		}
		System.out.printf("z : %d\n",count['z']);
	}

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

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

	Scanner sc=new Scanner(System.in);
	int[] chars=new int[256];
	while(sc.hasNextLine()){
	String line=sc.nextLine();
	for(int i =0;i<line.length();i++){
	char ch =Character.toLowerCase(line.charAt(i));
        char[ch]++;
}
    }
	for(char ch='a';ch<='z';ch++)
	{
		System.out.println(ch+" : "+chars[ch]);
	}
	}
}

Compiler output:
Main.java:12: error: ']' expected
        char[ch]++;
             ^
Main.java:12: error: ';' expected
        char[ch]++;
               ^
2 errors
Language: Java

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

	private static void printAnswer() {
		try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in));) {
			StringBuffer sb = new StringBuffer();
			String dataSet = br.readLine().toLowerCase();

			while (true) {
				sb.append(dataSet.toLowerCase());
				dataSet = br.readLine();
				if(dataSet == null){
					break;
				}
			}
			HashMap<String, Integer> alphCountingMap = makeAlphabetCountingMap(sb.toString());

			for (Entry<String, Integer> e : alphCountingMap.entrySet()) {
				System.out.println(e.getKey() + " : " + e.getValue());
			}

		} catch (IOException e) {
			throw new RuntimeException(e);
		}
	}

	private static HashMap<String, Integer> makeAlphabetCountingMap(String dataSet) {
		HashMap<String, Integer> alphCountingMap = new HashMap<String, Integer>();
		char alphabet = 'a';
		for (int i = 0; i <= ('z' - 'a'); i++) {
			alphCountingMap.put(String.valueOf(alphabet++), 0);
		}

		for (Integer i = 0; i < dataSet.length(); i++) {
			String apperedAlph = dataSet.substring(i, i + 1);
			if (alphCountingMap.containsKey(apperedAlph)) {
				int count = alphCountingMap.get(apperedAlph);
				alphCountingMap.put(apperedAlph, ++count);
			}
		}

		return alphCountingMap;
	}
}

Compiler output:
Main.java:29: error: cannot find symbol
	private static HashMap<String, Integer> makeAlphabetCountingMap(String dataSet) {
	               ^
  symbol:   class HashMap
  location: class Main
Main.java:7: error: cannot find symbol
		try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in));) {
		     ^
  symbol:   class BufferedReader
  location: class Main
Main.java:7: error: cannot find symbol
		try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in));) {
		                             ^
  symbol:   class BufferedReader
  location: class Main
Main.java:7: error: cannot find symbol
		try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in));) {
		                                                ^
  symbol:   class InputStreamReader
  location: class Main
Main.java:18: error: cannot find symbol
			HashMap<String, Integer> alphCountingMap = makeAlphabetCountingMap(sb.toString());
			^
  symbol:   class HashMap
  location: class Main
Main.java:20: error: cannot find symbol
			for (Entry<String, Integer> e : alphCountingMap.entrySet()) {
			     ^
  symbol:   class Entry
  location: class Main
Main.java:24: error: cannot find symbol
		} catch (IOException e) {
		         ^
  symbol:   class IOException
  location: class Main
Main.java:30: error: cannot find symbol
		HashMap<String, Integer> alphCountingMap = new HashMap<String, Integer>();
		^
  symbol:   class HashMap
  location: class Main
Main.java:30: error: cannot find symbol
		HashMap<String, Integer> alphCountingMap = new HashMap<String, Integer>();
		                                               ^
  symbol:   class HashMap
  location: class Main
9 errors
Language: Java

import java.io.*;

public class Countchar_solve{
	public static void main(String[] args) {
	BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String str;
		int count[] = new int[26];

		for(int i=0; i<26; i++) count[i]=0;
		while((str = in.readLine())!=null){
			str = str.toLowerCase();
			for(int i=0; i<str.length(); i++){
				if(str.charAt(i)-'a'<26 && str.charAt(i)-'a'>=0){
					count[str.charAt(i)-'a']++;
				}
			}
		}
		for(int i=0; i<26; i++){
			System.out.printf("%c : %d\n", (int)'a'+i, count[i]);
		}
	}
}

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

import java.io.*;

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

		for(int i=0; i<26; i++) count[i]=0;
		while((str = in.readLine())!=null){
			str = str.toLowerCase();
			for(int i=0; i<str.length(); i++){
				if(str.charAt(i)-'a'<26 && str.charAt(i)-'a'>=0){
					count[str.charAt(i)-'a']++;
				}
			}
		}
		for(int i=0; i<26; i++){
			System.out.printf("%c : %d\n", (int)'a'+i, count[i]);
		}
	}
}

Compiler output:
Main.java:10: error: unreported exception IOException; must be caught or declared to be thrown
		while((str = in.readLine())!=null){
		                        ^
1 error
Language: Java

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

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

		for(int i=0; i<26; i++) count[i]=0;
		while((str = in.readLine())!=null){
			str = str.toLowerCase();
			for(int i=0; i<str.length(); i++){
				if(str.charAt(i)-'a'<26 && str.charAt(i)-'a'>=0){
					count[str.charAt(i)-'a']++;
				}
			}
		}
        in.close();
		for(int i=0; i<26; i++){
			System.out.printf("%c : %d\n", (int)'a'+i, count[i]);
		}
	}
}

Compiler output:
Main.java:11: error: unreported exception IOException; must be caught or declared to be thrown
		while((str = in.readLine())!=null){
		                        ^
Main.java:19: error: unreported exception IOException; must be caught or declared to be thrown
        in.close();
                ^
2 errors
Language: Java

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Main4 {
 public static void main(String[] args){
	 String[] ch = {"a","b","c","d","e","f","g","h","i","j","k","l","n","m","o","p","q","r","s","t","u","v","w","x","y","z"};
	 String[] CH = {"A","B","C","D","E","F","G","H","I","J","K","L","N","M","O","P","Q","R","S","T","U","V","W","X","Y","Z"};
	 int[] con = new int[24];
	 Pattern p,P ;
	 Matcher m,M ;
	 String str = new java.util.Scanner(System.in).nextLine();
	 for(int i=0;i<24;i++){
		 p = Pattern.compile(ch[i]);
		 P = Pattern.compile(CH[i]);
		 m = p.matcher(str);
		 M = P.matcher(str);
		 if(m.find()||M.find()){
			 con[i]++;
		 }
	 }
	 for(int i=0;i<24;i++){
		 System.out.println(ch[i]+" :"+con[i]);
	 }
	 
 }
}

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

import java.util.Scanner;

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

    for(int i = 0; i < 26; i++) {
      count[i] = 0;
    }

    while(sc.hasNext()) {
      String string = sc.next();

      for(int i = 0; i < string.length(); i++) {
        char c = string.charAt(i);
        int index;

        if('A' <= c && c <= 'Z') {
          index = (int)(c - 'A');
        } else if('a' <= c && c <= 'z') {
          index = (int) (c - 'a');
        } else {
          continue;
        }

        count[index]++;
      }
    }

    for(int i = 0; i < 26; i++) {
      System.out.printf("%c:%d\n", i + 'a', count[i]);
    }
  }
}
~                                                                                                                                                                                                          
~                                                                                                                                                                                                          
~

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

import java.util.*;

public class Main {
	public static void main(String[] args) {
		int[] ch = new int[26];
		Scanner in = new Scanner(System.in);
		while(in.hasNextLine()){
			String line = in.nextLine();
			for(int i = 0; i < line.length(); i++){
				System.out.println(Character.toLowerCase(line.charAt(i)));
				char tmp = Character.toLowerCase(line.charAt(i));
				if('a' <= tmp && tmp <= 'z')
					ch[tmp - 'a']++;
				else continue;
			}
		}
		for(int j = 0; j < 'z' - 'a'; j++){
			System.out.println((char)(j + 'a') + ":" + ch[c - 'a']);
		}
	}
}

Compiler output:
Main.java:18: error: cannot find symbol
			System.out.println((char)(j + 'a') + ":" + ch[c - 'a']);
			                                              ^
  symbol:   variable c
  location: class Main
1 error
Language: Java

import java.util.Scanner;
public class Sub {
public static void main(String[] args) {
// ?¨??????\???????????????????????????????????????
Scanner sc = new Scanner(System.in);
int[] chars = new int[256];
while (sc.hasNextLine()) {
String line = sc.nextLine();
for (int i = 0; i < line.length(); i++) {
char ch = Character.toLowerCase(line.charAt(i));
// ??? ch???????????????????????????chars????????????????????´??°????????? ???


	chars[ch]++;

}
}
for (char ch = 'a'; ch <= 'z'; ch++) {
System.out.println(ch + " : " + chars[ch]);
}
}
}

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

import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// ?¨??????\???????????????????????????????????????
Scanner sc = new Scanner(System.in);
int[] chars = new int[256];
while (sc.hasNextLine()) {
String line = sc.nextLine();
for (int i = 0; i < line.length(); i++) {
char ch = Character.toLowerCase(line.charAt(i));
// ??? ch???????????????????????????chars????????????????????´??°????????? ???
char[ch]++;
}
}
for (char ch = 'a'; ch <= 'z'; ch++) {
System.out.println(ch + " : " + chars[ch]);
}
}
}

Compiler output:
Main.java:12: error: ']' expected
char[ch]++;
     ^
Main.java:12: error: ';' expected
char[ch]++;
       ^
2 errors
Language: Java

import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// ?¨??????\???????????????????????????????????????
Scanner sc = new Scanner(System.in);
int[] chars = new int[256];
while (sc.hasNextLine()) {
String line = sc.nextLine();
for (int i = 0; i < line.length(); i++) {
char ch = Character.toLowerCase(line.charAt(i));
// ??? ch???????????????????????????chars????????????????????´??°????????? ???
chars++;
}
}
for (char ch = 'a'; ch <= 'z'; ch++) {
System.out.println(ch + " : " + chars[ch]);
}
}
}

Compiler output:
Main.java:12: error: bad operand type int[] for unary operator '++'
chars++;
     ^
1 error
Language: Java

import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// ?¨??????\???????????????????????????????????????
Scanner sc = new Scanner(System.in);
int[] chars = new int[256];
while (sc.hasNextLine()) {
String line = sc.nextLine();
for (int i = 0; i < line.length(); i++) {
char ch = Character.toLowerCase(line.charAt(i));
// ??? ch???????????????????????????chars????????????????????´??°????????? ???
chars=chars+1;;
}
}
for (char ch = 'a'; ch <= 'z'; ch++) {
System.out.println(ch + " : " + chars[ch]);
}
}
}

Compiler output:
Main.java:12: error: bad operand types for binary operator '+'
chars=chars+1;;
           ^
  first type:  int[]
  second type: int
1 error
Language: Java

import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// ?¨??????\???????????????????????????????????????
Scanner sc = new Scanner(System.in);
int[] chars = new int[256];
while (sc.hasNextLine()) {
String line = sc.nextLine();
for (int i = 0; i < line.length(); i++) {
char ch = Character.toLowerCase(line.charAt(i));
// ??? ch???????????????????????????chars????????????????????´??°????????? ???
chars[ch]=chars+1;;
}
}
for (char ch = 'a'; ch <= 'z'; ch++) {
System.out.println(ch + " : " + chars[ch]);
}
}
}

Compiler output:
Main.java:12: error: bad operand types for binary operator '+'
chars[ch]=chars+1;;
               ^
  first type:  int[]
  second type: int
1 error
Language: Java

import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// ?¨??????\???????????????????????????????????????
Scanner sc = new Scanner(System.in);
int[] chars = new int[256];
while (sc.hasNextLine()) {
String line = sc.nextLine();
for (int i = 0; i < line.length(); i++) {
char ch = Character.toLowerCase(line.charAt(i));
// ??? ch???????????????????????????chars????????????????????´??°????????? ???
chars[ch]=chars+1;
}
}
for (char ch = 'a'; ch <= 'z'; ch++) {
System.out.println(ch + " : " + chars[ch]);
}
}
}

Compiler output:
Main.java:12: error: bad operand types for binary operator '+'
chars[ch]=chars+1;
               ^
  first type:  int[]
  second type: int
1 error
Language: Java

import java.util.Scanner;

public class main {
	public static void main(String[] args) {
		// ?¨??????\???????????????????????????????????????
		Scanner sc = new Scanner(System.in);
		int[] chars = new int[256];
		while (sc.hasNextLine()) {
			String line = sc.nextLine();
			for (char ch = 'a'; ch <= 'z'; ch++) {
				chars[ch] = 0;
			}
			for (int i = 0; i < line.length(); i++) {
				char ch = Character.toLowerCase(line.charAt(i));
				chars[ch]++;
			}
		}
		for (char ch = 'a'; ch <= 'z'; ch++) {
			System.out.println(ch + " : " + chars[ch]);
		}
	}
}

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

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

Scanner sc = new Scanner(System.in);
int[] chars = new int[256];
while (sc.hasNextLine()) {
String line = sc.nextLine();
for (int i = 0; i < line.length(); i++) {

chars[ch]++;
}
}
for (char ch = 'a'; ch <= 'z'; ch++) {
System.out.println(ch + " : " + chars[ch]);
}
}
}

Compiler output:
Main.java:11: error: cannot find symbol
chars[ch]++;
      ^
  symbol:   variable ch
  location: class Main
1 error
Language: Java

import java.util.Scanner;
public class Main {
	public static voidmain(String[] args) {
	// ?¨??????\???????????????????????????????????????
		Scanner sc= newScanner(System.in);
		int[] chars = new int[256];
		while(sc.hasNextLine()) {
			String line = sc.nextLine();
			for (int i=0; i< line.length(); i++) {
				char ch= Character.toLowerCase(line.charAt(i));
				// ??? ch???????????????????????????chars????????????????????´??°????????????
				chars[ch]++;
			}
		}
		for(charch= 'a'; ch<= 'z'; ch++) {
			System.out.println(ch+":"+chars[ch]);
		}
	}
}

Compiler output:
Main.java:3: error: invalid method declaration; return type required
	public static voidmain(String[] args) {
	              ^
1 error
Language: Java

import java.util.Scanner;
public class b{
    public static void main(String[] args){
	Scanner sc = new Scanner(System.in);
	int[] chars = new int[256];
	while (sc.hasNextLine()){
	    String line = sc.nextLine();
	    for(int i = 0; i < line.length(); i++){
		char ch = Character.toLowerCase(line.charAt(i));
		chars[ch]++;
	    }
	}
	for(char ch = 'a'; ch <= 'z'; ch++){
	    System.out.println(ch + ": " + chars[ch]);
	}
    }
}

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

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
	// ?¨??????\???????????????????????????????????????
		Scanner sc= new Scanner(System.in);
		int[] chars = new int[256];
		while(sc.hasNextLine()) {
			String line = sc.nextLine();
			for (int i=0; i< line.length(); i++) {
				char ch= Character.toLowerCase(line.charAt(i));
				// ??? ch???????????????????????????chars????????????????????´??°????????????
				chars[ch]++;
			}
		}
		for(charch= 'a'; ch<= 'z'; ch++) {
			System.out.println(ch+":"+chars[ch]);
		}
	}
}

Compiler output:
Main.java:16: error: cannot find symbol
		for(charch= 'a'; ch<= 'z'; ch++) {
		    ^
  symbol:   variable charch
  location: class Main
Main.java:16: error: cannot find symbol
		for(charch= 'a'; ch<= 'z'; ch++) {
		                 ^
  symbol:   variable ch
  location: class Main
Main.java:16: error: cannot find symbol
		for(charch= 'a'; ch<= 'z'; ch++) {
		                           ^
  symbol:   variable ch
  location: class Main
Main.java:17: error: cannot find symbol
			System.out.println(ch+":"+chars[ch]);
			                   ^
  symbol:   variable ch
  location: class Main
Main.java:17: error: cannot find symbol
			System.out.println(ch+":"+chars[ch]);
			                                ^
  symbol:   variable ch
  location: class Main
5 errors
Language: Java

import java.util.Scanner;

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

		for (int j=0; j < 256; j++) {
			chars[j] = 0;
		}

		while (sc.hasNextLine()) {
			String line = sc.nextLine();
			for (int i = 0; i < line.length(); i++) {
				char ch = Character.toLowerCase(line.charAt(i));
				/*-----*/
				chars[ch]++;
				/*-----*/
			}
		}
		for (char ch = 'a'; ch <= 'z'; ch++) {
			System.out.println(ch + " : " + chars[ch]);
		}
	}
}

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

import java.util.Scanner;
public classMain {
	public static voidmain(String[] args) {
		Scanner sc= newScanner(System.in);
		int[] chars = new int[256];
		while(sc.hasNextLine()) {
			String line = sc.nextLine();
			for (inti= 0; i< line.length(); i++) {
				char ch= Character.toLowerCase(line.charAt(i));
				chars[ch]++;
			}
		}
		for(charch= 'a'; ch<= 'z'; ch++) {
			System.out.println(ch+ " : " + chars[ch]);
		}
	}
}

Compiler output:
Main.java:2: error: class, interface, enum, or record expected
public classMain {
       ^
Main.java:3: error: class, interface, enum, or record expected
	public static voidmain(String[] args) {
	              ^
Main.java:5: error: unnamed classes are a preview feature and are disabled by default.
		int[] chars = new int[256];
		^
  (use --enable-preview to enable unnamed classes)
Main.java:6: error: class, interface, enum, or record expected
		while(sc.hasNextLine()) {
		^
Main.java:8: error: class, interface, enum, or record expected
			for (inti= 0; i< line.length(); i++) {
			^
Main.java:8: error: class, interface, enum, or record expected
			for (inti= 0; i< line.length(); i++) {
			              ^
Main.java:8: error: class, interface, enum, or record expected
			for (inti= 0; i< line.length(); i++) {
			                                ^
Main.java:10: error: class, interface, enum, or record expected
				chars[ch]++;
				^
Main.java:11: error: class, interface, enum, or record expected
			}
			^
Main.java:13: error: class, interface, enum, or record expected
		for(charch= 'a'; ch<= 'z'; ch++) {
		                 ^
Main.java:13: error: class, interface, enum, or record expected
		for(charch= 'a'; ch<= 'z'; ch++) {
		                           ^
Main.java:15: error: class, interface, enum, or record expected
		}
		^
12 errors
Language: Java

import java.util.Scanner;
public classMain {
	public static voidmain(String[] args) {
		Scanner sc= newScanner(System.in);
		int[] chars = new int[256];
		for(int i=0;i<256;i++){
     	 chars[i]=0;
    	}
		while(sc.hasNextLine()) {
			String line = sc.nextLine();
			for (inti= 0; i< line.length(); i++) {
				char ch= Character.toLowerCase(line.charAt(i));
				chars[ch]++;
			}
		}
		for(charch= 'a'; ch<= 'z'; ch++) {
			System.out.println(ch+ " : " + chars[ch]);
		}
	}
}

Compiler output:
Main.java:2: error: class, interface, enum, or record expected
public classMain {
       ^
Main.java:3: error: class, interface, enum, or record expected
	public static voidmain(String[] args) {
	              ^
Main.java:5: error: unnamed classes are a preview feature and are disabled by default.
		int[] chars = new int[256];
		^
  (use --enable-preview to enable unnamed classes)
Main.java:6: error: class, interface, enum, or record expected
		for(int i=0;i<256;i++){
		^
Main.java:6: error: class, interface, enum, or record expected
		for(int i=0;i<256;i++){
		            ^
Main.java:6: error: class, interface, enum, or record expected
		for(int i=0;i<256;i++){
		                  ^
Main.java:8: error: class, interface, enum, or record expected
    	}
    	^
Main.java:11: error: class, interface, enum, or record expected
			for (inti= 0; i< line.length(); i++) {
			^
Main.java:11: error: class, interface, enum, or record expected
			for (inti= 0; i< line.length(); i++) {
			              ^
Main.java:11: error: class, interface, enum, or record expected
			for (inti= 0; i< line.length(); i++) {
			                                ^
Main.java:13: error: class, interface, enum, or record expected
				chars[ch]++;
				^
Main.java:14: error: class, interface, enum, or record expected
			}
			^
Main.java:16: error: class, interface, enum, or record expected
		for(charch= 'a'; ch<= 'z'; ch++) {
		                 ^
Main.java:16: error: class, interface, enum, or record expected
		for(charch= 'a'; ch<= 'z'; ch++) {
		                           ^
Main.java:18: error: class, interface, enum, or record expected
		}
		^
15 errors
Language: Java

import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner sc= new Scanner(System.in);
		int[] chars = new int[256];
		for(int i=0;i<256;i++){
     	 chars[i]=0;
    	}
		while(sc.hasNextLine()) {
			String line = sc.nextLine();
			for (int i= 0; i< line.length(); i++) {
				char ch = Character.toLowerCase(line.charAt(i));
				chars[ch]++;
			}
		}
		for(charch= 'a'; ch<= 'z'; ch++) {
			System.out.println(ch+ " : " + chars[ch]);
		}
	}
}

Compiler output:
Main.java:16: error: cannot find symbol
		for(charch= 'a'; ch<= 'z'; ch++) {
		    ^
  symbol:   variable charch
  location: class Main
Main.java:16: error: cannot find symbol
		for(charch= 'a'; ch<= 'z'; ch++) {
		                 ^
  symbol:   variable ch
  location: class Main
Main.java:16: error: cannot find symbol
		for(charch= 'a'; ch<= 'z'; ch++) {
		                           ^
  symbol:   variable ch
  location: class Main
Main.java:17: error: cannot find symbol
			System.out.println(ch+ " : " + chars[ch]);
			                   ^
  symbol:   variable ch
  location: class Main
Main.java:17: error: cannot find symbol
			System.out.println(ch+ " : " + chars[ch]);
			                                     ^
  symbol:   variable ch
  location: class Main
5 errors
Language: Java

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
 
public class CountChara {
    public static void main(String[] args) {

        BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
        String lineBuffer = null, allLine = "";
        int index = 0;
        int[] numAlphabet = new int[26];

        try {
            while ((lineBuffer = stdin.readLine()) != null)
                allLine += lineBuffer;
        } catch (IOException e) {
            e.printStackTrace();
            System.err.println("Unexpected Error");
        }

        char[] in = allLine.toCharArray();
        for (int i = 0; i < allLine.length(); ++i) {
            index = Character.toLowerCase(in[i]) - 'a';
            if (0 <= index && index <= 26)
                ++numAlphabet[index];
        }
         
        for (int i = 0; i < 26; ++i)
            System.out.println((char)(i + 'a') + " : " + numAlphabet[i]);
    }
}

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

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
 
public class main {
    public static void main(String[] args) {

        BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
        String lineBuffer = null, allLine = "";
        int index = 0;
        int[] numAlphabet = new int[26];

        try {
            while ((lineBuffer = stdin.readLine()) != null)
                allLine += lineBuffer;
        } catch (IOException e) {
            e.printStackTrace();
            System.err.println("Unexpected Error");
        }

        char[] in = allLine.toCharArray();
        for (int i = 0; i < allLine.length(); ++i) {
            index = Character.toLowerCase(in[i]) - 'a';
            if (0 <= index && index <= 26)
                ++numAlphabet[index];
        }
         
        for (int i = 0; i < 26; ++i)
            System.out.println((char)(i + 'a') + " : " + numAlphabet[i]);
    }
}

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

import java.util.Scanner;

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

  Scanner sc = new Scanner(System.in);

  int[] chars = new int[256];

  while(sc.hasNextLine()){

   Stirng line = sc.nextLine();

   for (i = 0; i < line.length(); i++) {
    char c Character.toLowerCase(line.charAt(i));
   }
  }
  for (char c = 'a'; c <= 'z'; c++) {
   System.out.println(ch+":"+chars[c]);
  }
 }
}

Compiler output:
Main.java:15: error: ';' expected
    char c Character.toLowerCase(line.charAt(i));
          ^
1 error
Language: Java

import java.util.Scanner;

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

  Scanner sc = new Scanner(System.in);

  int[] char = new int[256];

  while(sc.hasNextLine()){

   Stirng line = sc.nextLine();


   for (i = 0; i < line.length(); i++) {

    char ch Character.toLowerCase(line.charAt(i));

   }
  }
  for (char ch = 'a'; ch <= 'z'; ch++) {
   System.out.println(ch+":"+char[ch]);
  }
 }
}

Compiler output:
Main.java:8: error: not a statement
  int[] char = new int[256];
     ^
Main.java:8: error: ';' expected
  int[] char = new int[256];
       ^
Main.java:8: error: not a statement
  int[] char = new int[256];
        ^
Main.java:8: error: ';' expected
  int[] char = new int[256];
            ^
Main.java:8: error: not a statement
  int[] char = new int[256];
               ^
Main.java:17: error: ';' expected
    char ch Character.toLowerCase(line.charAt(i));
           ^
Main.java:22: error: ']' expected
   System.out.println(ch+":"+char[ch]);
                                  ^
Main.java:22: error: ';' expected
   System.out.println(ch+":"+char[ch]);
                                    ^
8 errors
Language: Java

import java.util.Scanner;

public class Main{

 public static void main(String[] args) {

  Scanner sc = new Scanner(System.in);

  int[] chars = new int[256];

  while(sc.hasNextLine()){

   Stirng line = sc.nextLine();

   for (i = 0; i < line.length(); i++) {

    char ch Character.toLowerCase(line.charAt(i));
   }
  }
  for (char ch = 'a'; ch <= 'z'; ch++) {
   System.out.println(ch+":"+chars[ch]);
  }
 }
}

Compiler output:
Main.java:17: error: ';' expected
    char ch Character.toLowerCase(line.charAt(i));
           ^
1 error
Language: Java

import java.util.Scanner;

public class Main{
 public static void main(String[] args) {
  Scanner sc = new Scanner(System.in);
  int[] chars = new int[256];
  while(sc.hasNextLine()){
   Stirng line = sc.nextLine();
   for (i = 0; i < line.length(); i++) {
    char ch Character.toLowerCase(line.charAt(i));
   }
  }
  for (char ch = 'a'; ch <= 'z'; ch++) {
   System.out.println(ch+":"+chars[ch]);
  }
 }
}

Compiler output:
Main.java:10: error: ';' expected
    char ch Character.toLowerCase(line.charAt(i));
           ^
1 error
Language: Java

import java.util.Scanner;

public class Main{

 public static void main(String[] args) {

  Scanner sc = new Scanner(System.in);

  int[] chars = new int[256];

  while(sc.hasNextLine()){

   Stirng line = sc.nextLine();

   for (i = 0; i < line.length(); i++) {

    char ch Character.toLowerCase(line.charAt(i))

   }
  }
  for (char ch = 'a'; ch <= 'z'; ch++) {
   System.out.println(ch+":"+chars[ch]);
  }
 }
}

Compiler output:
Main.java:17: error: ';' expected
    char ch Character.toLowerCase(line.charAt(i))
           ^
Main.java:17: error: ';' expected
    char ch Character.toLowerCase(line.charAt(i))
                                                 ^
2 errors
Language: Java

import java.util.Scanner;

public class Main{
	public static void main(String[]args){
		Scanner sc = new Scanner(System.in);
		int[] chars = new int[256];
		while(sc.hasNextLine()){
			String line = sc.nextLine();
			for (int i = 0; i < line.length(); i++){
				char ch = Character.toLowerCase(line.charAt(i));
				int index = Character.getNumericValue(char);
				chars[index]++;
			}
		}
	for (char ch = 'a'; ch <= 'z'; ch++){
		System.out.println(ch + ":" + chars[ch]);
	}
	}
	
}

Compiler output:
Main.java:11: error: '.class' expected
				int index = Character.getNumericValue(char);
				                                          ^
1 error
Language: Java

import java.util.Scanner;

public class TTC_6 {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		//String line=sc.nextLine();
		int a[] =new int[256];
		while(sc.hasNextLine()){
			String buf = sc.nextLine();
			char c[] = buf.toLowerCase().toCharArray();
			for (int i = 0; i < c.length; i++) {
				a[(int)c[i]]++;
			}
		}
		//String  s =line.toLowerCase().replaceAll(" ", "").replaceAll(",", "").replaceAll(".", "");
//		char c[] = s.toCharArray();
//		for (int i = 0; i < c.length; i++) {
//			a[(int)c[i]-97]++;
//		}
		
		for (int i = 0; i < a.length; i++) {
			char w = (char)(97+i);
			System.out.println(w+" : "+a[w]);
		}
		sc.close();
	}
}

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

public class Main {
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		int alph[] = new int[26];
		while(sc.hasNext()){
			String S = sc.next();
			for(int i = 0; i < S.length(); i++){
				char c = S.charAt(i);
				if('A' <= c && c <= 'Z'){
					alph[c - 'A']++;
				} else if('a' <= c && c <= 'z'){
					alph[c - 'a']++;
				}
			}
		}
		for(char c = 'a'; c <= 'z'; c++){
			System.out.println(c + " : " +alph[c-'a']);
		}
	}
}

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

import java.io.*;

public class Main{
 public static void main(String[] args){
  BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));
  try{
   String phrase =reader.readLine();
   int[] alphabet =new int[26];
   //Search the length of the phrase
   for(int i=0;i<phrase.length();i++){
    char case =phrase.charAt(i);   //sesrch each case
    int case_s=(int)case-(int)'a'; //For counting lowercase
    int case_C=(int)case-(int)'A'; //For counting capitalcase
    //If a case in the phrase is "j"st alphabet,add 1 to the counter of it
    for(int j=0;j<26;j++){
     if(case_s==j||case_C==j){
      alphabet[j]++;
     }
   }
   }
    //Output the result (use ASCII code)
    for(int k=0;k<26;k++){
     System.out.println((char)(97+k)+" : "+alphabet[k]);
    }
  }catch(IOException e){
   System.out.println(e);
  }

 }
}

Compiler output:
Main.java:11: error: not a statement
    char case =phrase.charAt(i);   //sesrch each case
    ^
Main.java:11: error: ';' expected
    char case =phrase.charAt(i);   //sesrch each case
        ^
Main.java:11: error: orphaned case
    char case =phrase.charAt(i);   //sesrch each case
         ^
Main.java:11: error: illegal start of expression
    char case =phrase.charAt(i);   //sesrch each case
              ^
Main.java:11: error: : or -> expected
    char case =phrase.charAt(i);   //sesrch each case
                               ^
Main.java:12: error: illegal start of expression
    int case_s=(int)case-(int)'a'; //For counting lowercase
                    ^
Main.java:12: error: : or -> expected
    int case_s=(int)case-(int)'a'; //For counting lowercase
                                 ^
Main.java:13: error: illegal start of expression
    int case_C=(int)case-(int)'A'; //For counting capitalcase
                    ^
Main.java:13: error: : or -> expected
    int case_C=(int)case-(int)'A'; //For counting capitalcase
                                 ^
9 errors
Language: Java

import java.io.*;

public class MAin{
 public static void main(String[] args){
  BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));
  try{
   String phrase =reader.readLine();
   int[] alphabet =new int[26];
   //Search the length of the phrase
   for(int i=0;i<phrase.length();i++){
    char word =phrase.charAt(i);   //sesrch each case
    int word_s=(int)word-(int)'a'; //For counting lowercase
    int word_C=(int)word-(int)'A'; //For counting capitalcase
    //If a case in the phrase is "j"st alphabet,add 1 to the counter of it
    for(int j=0;j<26;j++){
     if(word_s==j||word_C==j){
      alphabet[j]++;
     }
   }
   }
    //Output the result (use ASCII code)
    for(int k=0;k<26;k++){
     System.out.println((char)(97+k)+" : "+alphabet[k]);
    }
  }catch(IOException e){
   System.out.println(e);
  }

 }
}

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

import java.io.*;

public class Main{
 public static void main(String[] args){
  BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));
  try{
   String phrase =reader.readLine();
   int[] alphabet =new int[26];
   //Search the length of the phrase
   if(phrase.length()<=1200)
   for(int i=0;i<phrase.length();i++){
    char word =phrase.charAt(i);   //sesrch each case
    int word_s=(int)word-(int)'a'; //For counting lowercase
    int word_C=(int)word-(int)'A'; //For counting capitalcase
    //If a case in the phrase is "j"st alphabet,add 1 to the counter of it
    for(int j=0;j<26;j++){
     if(word_s==j||word_C==j){
      alphabet[j]++;
     }
   }
   }
    //Output the result (use ASCII code)
    for(int k=0;k<26;k++){
     System.out.println((char)(97+k)+" : "+alphabet[k]);
    }
  }catch(IOException e){
   System.out.println(e);
  }
  } 
 }
}

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

import java.io.*;

public class Main{
 public static void main(String[] args){
  BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));
  try{
   String phrase =reader.readLine();
   int[] alphabet =new int[26];
   //Search the length of the phrase
   if(phrase.length()<=1200){
   for(int i=0;i<phrase.length();i++){
    char word =phrase.charAt(i);   //sesrch each case
    int word_s=(int)word-(int)'a'; //For counting lowercase
    int word_C=(int)word-(int)'A'; //For counting capitalcase
    //If a case in the phrase is "j"st alphabet,add 1 to the counter of it
    for(int j=0;j<26;j++){
     if(word_s==j||word_C==j){
      alphabet[j]++;
     }
   }
   }
    //Output the result (use ASCII code)
    for(int k=0;k<26;k++){
     System.out.println((char)(97+k)+" : "+alphabet[k]);
    }
  }catch(IOException e){
   System.out.println(e);
  }
  }
 } 
}

Compiler output:
Main.java:26: error: 'catch' without 'try'
  }catch(IOException e){
   ^
Main.java:6: error: 'try' without 'catch', 'finally' or resource declarations
  try{
  ^
2 errors
Language: Java

import java.io.*;

public class Main{
 public static void main(String[] args){
  BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));
  try{
   String phrase =reader.readLine();
   int[] alphabet =new int[26];
   if(pharase.length()<=1200){
   //Search the length of the phrase
   for(int i=0;i<phrase.length();i++){
    char word =phrase.charAt(i);   //sesrch each case
    int word_s=(int)word-(int)'a'; //For counting lowercase
    int word_C=(int)word-(int)'A'; //For counting capitalcase
    //If a case in the phrase is "j"st alphabet,add 1 to the counter of it
    for(int j=0;j<26;j++){
     if(word_s==j||word_C==j){
      alphabet[j]++;
     }
   }
   }
    //Output the result (use ASCII code)
    for(int k=0;k<26;k++){
     System.out.println((char)(97+k)+" : "+alphabet[k]);
    }
  }catch(IOException e){
   System.out.println(e);
  }
}
 }
}

Compiler output:
Main.java:26: error: 'catch' without 'try'
  }catch(IOException e){
   ^
Main.java:6: error: 'try' without 'catch', 'finally' or resource declarations
  try{
  ^
2 errors