android on login application to switch between two intents
<pre><code> @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);


        txtUserName=(EditText)this.findViewById(R.id.txtUname);
        txtPassword=(EditText)this.findViewById(R.id.txtPwd);
        btnLogin=(Button)this.findViewById(R.id.btnLogin);
        btnLogin=(Button)this.findViewById(R.id.btnLogin);
        btnLogin.setOnClickListener(new OnClickListener() {

             Button next = (Button) findViewById(R.id.Button01);
   error1:   next.setOnClickListener(new View.OnClickListener() {   

           public void onClick(View view) {
           Intent myIntent = new Intent(view.getContext(), AddName.class);
           startActivityForResult(myIntent, 0); 
       }}
   error2:  )

       };

    if((txtUserName.getText().toString()).equals(txtPassword.getText().toString())){
           Toast.makeText(LoginappActivity.this, "Login Successful",Toast.LENGTH_LONG).show();
          } else{
           Toast.makeText(LoginappActivity.this, "Invalid Login",Toast.LENGTH_LONG).show(); 
           }
             }

    }
</code></pre>

<p>i have created a login application to change from one intent to another intent. The other .java works fine </p>

<ul>
<li><p>error1: Syntax error on tokens, AnnotationName expected instead</p></li>
<li><p>error2: Multiple markers at this line<br>
        - <code>Syntax error, insert "EnumBody" to complete EnumDeclaration</code><br>
        - <code>Syntax error, insert "enum Identifier" to complete EnumHeaderName</code><br>
        - <code>Syntax error, insert ")" to complete Expression</code><br>
        - <code>Syntax error, insert "}" to complete ClassBody</code>  </p></li>
</ul>
