title: Android Error: "Not a statement" with "Button"
body: <p>I've been struggling with my code which is shows the error "Not a statement" on "Button" line</p>
  
  <p>Here is my code:</p>
  
  <pre><code>public class NewShiftActivity extends AppCompatActivity {
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_new_shift);
  
          Button button = new (Button) findViewById(R.id.btnCancel);
          button.setOnClickListener(new View.OnClickListener() {
  
              @Override
              public void onClick(View v){
                  startActivity(new Intent(NewShiftActivity.this,MainActivity.class));
              }
  
          });
      }
  }
  </code></pre>
  
  <p>I'm using Android Studio, API 23</p>
  
  <p>Thanks in advance!</p>