title: illegal start of expression (Android)
body: <p>Learning to code.. Can someone help me out</p>
  
  <p>Its about, getting the user input and then toast as an output</p>
  
  <pre><code>public class MainActivity extends ActionBarActivity {
  
  private EditText input;
  private Button output;
  
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
  
      addListenerOnButton();
  }
  
  public void addListenerOnButton() {
      input = (EditText) findViewById(R.id.editText input);
      output = (Button) findViewById(R.id.button output);
      output.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
              Toast toast;
              toast = new Toast(getApplicationContext());
              toast.setGravity(Gravity.TOP | Gravity.LEFT, 0, 0);
              toast.makeText(MainActivity.this, input.getText(), toast.LENGTH_SHORT).show();
          }
      });
  }
  </code></pre>
  
  <p>While compile this ..am getting an error illegal start of expression </p>
  
  <pre><code>C:\Users\VG\AndroidStudioProjects\MakeToast\app\src\main\java\com\example\vg\maketoast\MainActivity.java
  Error:(29, 54) error: ')' expected
  Error:(29, 60) error: illegal start of expression
  Error:(30, 51) error: ')' expected
  Error:(30, 58) error: illegal start of expression
  Error:Execution failed for task ':app:compileDebugJava'.
  &gt; Compilation failed; see the compiler error output for details.
  </code></pre>