title: 'Expected class or package' when using Intents and OnClickListeners
body: <p>I have this weird problem which only occurs on this one activity and I cannot work out what I am doing wrong.</p>
  
  <p>Ther errors are coming up at "notReg.OnClickListener..." and "registerBtn.OnCLickListener..."</p>
  
  <pre><code>import android.content.Intent;
  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.TextView;
  
  public class register extends AppCompatActivity {
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_register);
  
          final TextView notReg = (TextView) findViewById(R.id.notReg);
          final Button registerBtn = (Button) findViewById(R.id.registerBtn);
  
          notReg.OnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View v) {
                  Intent loginIntent = new Intent(register.this, login.class);
                  register.this.startActivity(loginIntent);
              }
          });
  
          registerBtn.OnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View v) {
                  Intent homeIntent = new Intent(register.this, home.class);
                  register.this.startActivity(homeIntent);
              }
          });
      }
  }
  </code></pre>