How to initialize public Spinner array in Android :  Why can't I initialize this Spinner array in this way? I need to access the content inside the array in another method not included here, that is why the array is declared public.   

    public class AnotherActivity extends AppCompatActivity{
    public Spinner [] jobSites;
    
    Spinner x, y;
    
    @Override
    protected void OnCreate(Bundle savedInstanceState){
    
    x= findViewById(R.id.job1);
    y= findViewById(R.id.job2);
    jobSites = {x,y};
    
    }