Android app force closes soon as i open it on emulator
<p>I went through similar kind of questions on older posts.. rectified them. Still getting force close problem. Please help.</p>

<p>Which of the following is correct?</p>

<pre><code>Button continueButton = (Button) findViewById(R.id.continue_button);
</code></pre>

<p>or</p>

<p><code>View continueButton = findViewById(R.id.continue_button);</code></p>

<p>And what's the difference between them ?</p>

<hr>

<pre><code>package org.example.sudoku;

import android.os.Bundle;


import android.view.View.OnClickListener;
import android.app.Activity;
import android.view.Menu;
import android.widget.Button;

public class Sudoku extends Activity {

    @Override
    public void onCreate(Bundle savedInstanceState) {

        super.onCreate(savedInstanceState);    
        setContentView(R.layout.main);

       Button continueButton = (Button) findViewById(R.id.continue_button);
       continueButton.setOnClickListener((OnClickListener) this);

       Button aboutButton = (Button)findViewById(R.id.about_button);
       aboutButton.setOnClickListener((OnClickListener) this);

       Button newButton = (Button)findViewById(R.id.new_game_button);
       newButton.setOnClickListener((OnClickListener) this);

       Button exitButton = (Button)findViewById(R.id.exit_button);
       exitButton.setOnClickListener((OnClickListener) this);


    }


    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.main, menu);
        return true;
    }

}
</code></pre>

<hr>
