title: Array initializer is not allowed here
body: <p>I am working on Android project and I am getting an error which I cannot understand:</p>
  
  <blockquote>
    <p>Array initializer is not allowed here</p>
  </blockquote>
  
  <p>I tried to simplify my code and it comes down to this</p>
  
  <pre><code>public class MainActivity extends Activity{
  
      int pos = {0, 1, 2};
  
      @Override
      protected void onCreate(Bundle savedInstanceState){
          super.onCreate(savedInstanceState);
          setContentView(R.layout.main);
          pos = {2, 1, 0};
      }
  }
  </code></pre>
  
  <p>What is going on here?</p>