Array Initialization

<1 min read

[@687]
Array Initialization

public class Example {
  public Boolean flags[] = new Boolean[4];
  public static void main(String[] args) {
    Example ex = new Example();
    System.out.println( "Flag 1 is " + ex.flags[1] );
  }
}

Yes, Flag 1 is null. I can't believe I forgot that.