title: Android Studio says "Expression expected"
body: <p>Android Studio tells there is an error in Java file, in string             <code>summonButton2();</code> Android Studio says "Expression expected".</p>
  
  <p>I want the method <code>summonButton2</code> to be launched automatically. I undesrtand that I'm doing it wrong. What exactly and is there any other way to start a method, except adding it to <code>onCreate</code> method? Thanks in advance.</p>
  
  <pre><code>import android.support.v7.app.AppCompatActivity;
  import android.os.Bundle;
  import android.view.View;
  import android.widget.Button;
  import android.widget.EditText;
  import android.widget.LinearLayout;
  import android.widget.Toast;
  
  public class MainActivity extends AppCompatActivity {
  
      int numberOfLinesLeft = 3;
  
      Button secondaryActivityAddButton;
  
      LinearLayout llForSecondaryButton;
  
      LinearLayout llForSecondaryEditText;
  
      EditText et;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
          summonButton2();
      }
  
          public void summonButton2(View view){
  
              llForSecondaryButton = findViewById(R.id.secondaryButton);
              secondaryActivityAddButton = new Button(this);
  
              secondaryActivityAddButton.setText("" + numberOfLinesLeft);
              llForSecondaryButton.addView(secondaryActivityAddButton);
  
              secondaryActivityAddButton.setOnClickListener(new View.OnClickListener() {
  
                  public void onClick(View view) {
  
                      plusTextField();
  
                      if(numberOfLinesLeft == 0) {
                          view.setVisibility(View.GONE);
                      }
  
                  }
              });
  
          }
  
      public void plusTextField() {
  
          llForSecondaryEditText = findViewById(R.id.linearLayout1);
  
          // add edittext
          et = new EditText(this);
          et.setText("text" + numberOfLinesLeft       );
          llForSecondaryEditText.addView(et);
          numberOfLinesLeft--;
          secondaryActivityAddButton.setText("" + numberOfLinesLeft);
  
      }
  }
  </code></pre>