fork download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6.  
  7. /* Name of the class has to be "Main" only if the class is public. */
  8. public class main {
  9. public static void main(String[] args){
  10. String[] Population[8] = {"00111101", "10000110", "11111001", "10011100", "01110100", "11100010", "11010000", "01010110"};
  11. decodedPop[Population[].length()];
  12. int i = 0;
  13. while(i != Population[].length()){
  14. if((Population[i].substring(i, i+2)).equals("00"){
  15. System.out.println("YAY");
  16. }
  17. decodedPop[i] = Population
  18. }
  19.  
  20. }
  21. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:10: error: ']' expected
    String[] Population[8] = {"00111101", "10000110", "11111001", "10011100", "01110100", "11100010", "11010000", "01010110"};
                        ^
Main.java:10: error: illegal start of expression
    String[] Population[8] = {"00111101", "10000110", "11111001", "10011100", "01110100", "11100010", "11010000", "01010110"};
                         ^
Main.java:10: error: illegal start of expression
    String[] Population[8] = {"00111101", "10000110", "11111001", "10011100", "01110100", "11100010", "11010000", "01010110"};
                             ^
Main.java:10: error: not a statement
    String[] Population[8] = {"00111101", "10000110", "11111001", "10011100", "01110100", "11100010", "11010000", "01010110"};
                              ^
Main.java:10: error: ';' expected
    String[] Population[8] = {"00111101", "10000110", "11111001", "10011100", "01110100", "11100010", "11010000", "01010110"};
                                        ^
Main.java:11: error: ']' expected
    decodedPop[Population[].length()];
               ^
Main.java:11: error: ';' expected
    decodedPop[Population[].length()];
                           ^
Main.java:11: error: invalid method declaration; return type required
    decodedPop[Population[].length()];
                            ^
Main.java:11: error: ';' expected
    decodedPop[Population[].length()];
                                    ^
Main.java:13: error: illegal start of type
    while(i != Population[].length()){
    ^
Main.java:13: error: <identifier> expected
    while(i != Population[].length()){
           ^
Main.java:13: error: ';' expected
    while(i != Population[].length()){
              ^
Main.java:13: error: illegal start of type
    while(i != Population[].length()){
                         ^
Main.java:13: error: <identifier> expected
    while(i != Population[].length()){
                          ^
Main.java:13: error: ';' expected
    while(i != Population[].length()){
                           ^
Main.java:13: error: invalid method declaration; return type required
    while(i != Population[].length()){
                            ^
Main.java:13: error: ';' expected
    while(i != Population[].length()){
                                    ^
Main.java:14: error: ')' expected
      if((Population[i].substring(i, i+2)).equals("00"){
                                                       ^
Main.java:17: error: ';' expected
      decodedPop[i] = Population
                                ^
Main.java:21: error: class, interface, or enum expected
}
^
20 errors
stdout
Standard output is empty