title: Is it possible to declare an object array in Java and initialize later?
body: <p>I'm trying to get more familiar with object arrays in Java and one thing I was attempting to do that is failing is declaring an object array on one line and then initializing it on a later line. Is this possible? Am I making a format mistake or just trying to do something I can't?</p>
  
  <p>tl:dr; can a Java object array do something like this, below?</p>
  
  <pre><code>int[] s;
  s = new int[]{ and put the list here..}
  </code></pre>
  
  <p>edit: adding my current code and error example</p>
  
  <pre><code>public class noncombatSKILLS {
          noncombatSKILLS ( String receivName , String receivDescription , int receivDamage )
          {
          name = receivName ;
          description = receivDescription ;
          damage = receivDamage ;
  !
  !
  public class CHARACTER {
  noncombatSKILLS[] noncombat;
  noncombat[] = {  new noncombatSKILLS( "Scavenge" , "find some parts" , 123 ) } ;
  </code></pre>
  
  <p>this compiles correctly with just the declaration line under the CHARACTER class, but when I try to compile with the line added after it, I get 'error: not a statement' pointing the brackets following the 'noncombat'</p>