title: Why am i unable to add an array as an instance field?
body: <p>I wanted to add an array as an instance field, also a part of an object, however it gives me interesting errors when i try to do so:</p>
  <pre><code>class Surgeon {
    private String[] surgeons;
  
    public Surgeon() {
      this.surgeons = {&quot;Romero&quot;, &quot;Jackson&quot;, &quot;Hannah&quot;, &quot;Camilla&quot;};
    }
  
    public static void main(String[] args) {
      Surgeon surg = new Surgeon();
    }
  }
  </code></pre>
  <p>And it gives me three errors.</p>
  <p>This does not make any sense bc is it not how you initialize an array?</p>