Open second activity after clicking a specific radio button, otherwise, show message
<p>I am rather new to Android/Java programming and looking for some help with a very, very basic app that I am working with.  I am purely building this just to get used to Java coding and building applications for Droids, so bear with me.</p>

<p>I have 10 radio buttons grouped together and only one of them is the right answer (button #10).  If the user clicks on any of them 1-9 I have it displaying a message that says "sorry try again", but if they click on #10, I want it to take them to a new activity, namely a page where I will put up some graphics and text that says congraulations and things of that nature.  The buttons work fine for 1-9, but when I click on #10 I am gettinga  force close error.  </p>

<p>Here's what I have so far:</p>

<pre><code>    public class MainQuiz extends Activity implements OnCheckedChangeListener, android.widget.RadioGroup.OnCheckedChangeListener {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main_quiz);
    ((RadioGroup)findViewById(R.id.radio_group)).setOnCheckedChangeListener(this);}  

public void onCheckedChanged(RadioGroup radioGroup, int checkedId) {    
        String numeral = null;              
        if (checkedId == R.id.button1) {
            numeral = "Nope, try again!";
        } else if (checkedId == R.id.button2) {
            numeral = "Nope, try again!";
        } else if (checkedId == R.id.button3) {
            numeral = "Nope, try again!";
        }   
        else if (checkedId == R.id.button4) {
            numeral = "Nope, try again!";
        } 
        else if (checkedId == R.id.button5) {
            numeral = "Nope, try again!";
        } 
        else if (checkedId == R.id.button6) {
            numeral = "Nope, try again!";
        } 
        else if (checkedId == R.id.button7) {
            numeral = "Nope, try again!";
        } 
        else if (checkedId == R.id.button8) {
            numeral = "Nope, try again!";
        } 
        else if (checkedId == R.id.button9) {
            numeral = "Nope, try again!";
        } 
        else if (checkedId == R.id.button10) {
            Intent myIntent = new Intent(MainQuiz.this, CorrectAnswer.class); 
            MainQuiz.this.startActivity(myIntent);


        } 
        Toast.makeText(getApplicationContext(), ""+numeral+"",
                Toast.LENGTH_SHORT).show();        } 
</code></pre>

<p>Any help would be apprecitaed, I am sure this is a simple fix and I am sure it is something glaring in the syntax and code that I have messed up, but again, I am new :)</p>

<p>Thanks!</p>

<p>Here is the log after the Force Close:</p>

<pre><code>11-14 13:56:48.982: D/AndroidRuntime(862): Shutting down VM
11-14 13:56:48.982: W/dalvikvm(862): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
11-14 13:56:48.992: E/AndroidRuntime(862): FATAL EXCEPTION: main
11-14 13:56:48.992: E/AndroidRuntime(862): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.test.quiz/com.test.quiz.CorrectAnswer}: java.lang.ClassCastException: com.test.quiz.CorrectAnswer
11-14 13:56:48.992: E/AndroidRuntime(862):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2585)
11-14 13:56:48.992: E/AndroidRuntime(862):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
11-14 13:56:48.992: E/AndroidRuntime(862):  at android.app.ActivityThread.access$2300(ActivityThread.java:125)
11-14 13:56:48.992: E/AndroidRuntime(862):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
11-14 13:56:48.992: E/AndroidRuntime(862):  at android.os.Handler.dispatchMessage(Handler.java:99)
11-14 13:56:48.992: E/AndroidRuntime(862):  at android.os.Looper.loop(Looper.java:123)
11-14 13:56:48.992: E/AndroidRuntime(862):  at android.app.ActivityThread.main(ActivityThread.java:4627)
11-14 13:56:48.992: E/AndroidRuntime(862):  at java.lang.reflect.Method.invokeNative(Native Method)
11-14 13:56:48.992: E/AndroidRuntime(862):  at java.lang.reflect.Method.invoke(Method.java:521)
11-14 13:56:48.992: E/AndroidRuntime(862):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
11-14 13:56:48.992: E/AndroidRuntime(862):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
11-14 13:56:48.992: E/AndroidRuntime(862):  at dalvik.system.NativeStart.main(Native Method)
11-14 13:56:48.992: E/AndroidRuntime(862): Caused by: java.lang.ClassCastException: com.test.quiz.CorrectAnswer
11-14 13:56:48.992: E/AndroidRuntime(862):  at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
11-14 13:56:48.992: E/AndroidRuntime(862):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2577)
11-14 13:56:48.992: E/AndroidRuntime(862):  ... 11 more
</code></pre>
