Language: Java

#include<iostream>#include<string>#include<cstdio>using namespace std; int main(){    string type;    int t[4]={0};    while(cin>>type){        type+=" ";        int i;        for(i=0;type[i]!=',';i++);        i++;        if(type[i]=='A'&&type[i+1]=='B'){            t[2]++;        }else if(type[i]=='A'){            t[0]++;        }else if(type[i]=='B'){            t[1]++;        }else if(type[i]=='O'){            t[3]++;        }    }    for(int i=0;i<4;i++){        cout<<t[i]<<endl;    }                }

Compiler output:
Main.java:1: error: illegal character: '#'
#include<iostream>#include<string>#include<cstdio>using namespace std; int main(){    string type;    int t[4]={0};    while(cin>>type){        type+=" ";        int i;        for(i=0;type[i]!=',';i++);        i++;        if(type[i]=='A'&&type[i+1]=='B'){            t[2]++;        }else if(type[i]=='A'){            t[0]++;        }else if(type[i]=='B'){            t[1]++;        }else if(type[i]=='O'){            t[3]++;        }    }    for(int i=0;i<4;i++){        cout<<t[i]<<endl;    }                }
^
Main.java:1: error: illegal character: '#'
#include<iostream>#include<string>#include<cstdio>using namespace std; int main(){    string type;    int t[4]={0};    while(cin>>type){        type+=" ";        int i;        for(i=0;type[i]!=',';i++);        i++;        if(type[i]=='A'&&type[i+1]=='B'){            t[2]++;        }else if(type[i]=='A'){            t[0]++;        }else if(type[i]=='B'){            t[1]++;        }else if(type[i]=='O'){            t[3]++;        }    }    for(int i=0;i<4;i++){        cout<<t[i]<<endl;    }                }
                  ^
Main.java:1: error: illegal character: '#'
#include<iostream>#include<string>#include<cstdio>using namespace std; int main(){    string type;    int t[4]={0};    while(cin>>type){        type+=" ";        int i;        for(i=0;type[i]!=',';i++);        i++;        if(type[i]=='A'&&type[i+1]=='B'){            t[2]++;        }else if(type[i]=='A'){            t[0]++;        }else if(type[i]=='B'){            t[1]++;        }else if(type[i]=='O'){            t[3]++;        }    }    for(int i=0;i<4;i++){        cout<<t[i]<<endl;    }                }
                                  ^
Main.java:1: error: not a statement
#include<iostream>#include<string>#include<cstdio>using namespace std; int main(){    string type;    int t[4]={0};    while(cin>>type){        type+=" ";        int i;        for(i=0;type[i]!=',';i++);        i++;        if(type[i]=='A'&&type[i+1]=='B'){            t[2]++;        }else if(type[i]=='A'){            t[0]++;        }else if(type[i]=='B'){            t[1]++;        }else if(type[i]=='O'){            t[3]++;        }    }    for(int i=0;i<4;i++){        cout<<t[i]<<endl;    }                }
                                                                                                                ^
Main.java:1: error: not a statement
#include<iostream>#include<string>#include<cstdio>using namespace std; int main(){    string type;    int t[4]={0};    while(cin>>type){        type+=" ";        int i;        for(i=0;type[i]!=',';i++);        i++;        if(type[i]=='A'&&type[i+1]=='B'){            t[2]++;        }else if(type[i]=='A'){            t[0]++;        }else if(type[i]=='B'){            t[1]++;        }else if(type[i]=='O'){            t[3]++;        }    }    for(int i=0;i<4;i++){        cout<<t[i]<<endl;    }                }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 ^
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
#include<iostream>#include<string>#include<cstdio>using namespace std; int main(){    string type;    int t[4]={0};    while(cin>>type){        type+=" ";        int i;        for(i=0;type[i]!=',';i++);        i++;        if(type[i]=='A'&&type[i+1]=='B'){            t[2]++;        }else if(type[i]=='A'){            t[0]++;        }else if(type[i]=='B'){            t[1]++;        }else if(type[i]=='O'){            t[3]++;        }    }    for(int i=0;i<4;i++){        cout<<t[i]<<endl;    }                }
                                                                       ^
  (use --enable-preview to enable unnamed classes)
Main.java:1: error: ']' expected
#include<iostream>#include<string>#include<cstdio>using namespace std; int main(){    string type;    int t[4]={0};    while(cin>>type){        type+=" ";        int i;        for(i=0;type[i]!=',';i++);        i++;        if(type[i]=='A'&&type[i+1]=='B'){            t[2]++;        }else if(type[i]=='A'){            t[0]++;        }else if(type[i]=='B'){            t[1]++;        }else if(type[i]=='O'){            t[3]++;        }    }    for(int i=0;i<4;i++){        cout<<t[i]<<endl;    }                }
                                                                                                            ^
Main.java:1: error: ';' expected
#include<iostream>#include<string>#include<cstdio>using namespace std; int main(){    string type;    int t[4]={0};    while(cin>>type){        type+=" ";        int i;        for(i=0;type[i]!=',';i++);        i++;        if(type[i]=='A'&&type[i+1]=='B'){            t[2]++;        }else if(type[i]=='A'){            t[0]++;        }else if(type[i]=='B'){            t[1]++;        }else if(type[i]=='O'){            t[3]++;        }    }    for(int i=0;i<4;i++){        cout<<t[i]<<endl;    }                }
                                                                                                                 ^
8 errors