Navigation from one screen to another screen not working in android
<p>public class check extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);</p>

<pre><code>}

void myonclick(View view)
{
    Intent mIntent = new Intent(this,check2.class);
     startActivity(mIntent);
}
</code></pre>

<p>}</p>

<p>class check2 extends Activity {</p>

<pre><code>@Override
public void onCreate(Bundle savedInstanceState) {
   // super.onCreate(savedInstanceState);
   // setContentView(R.layout.main);

    Toast.makeText(
            this,
            "Welcome to second page", Toast.LENGTH_LONG).show();
    finish();  

}
</code></pre>

<p>}</p>

<p>hi this is my code when i run this ..and when i click a button it will show error in emulator has (The Application Check has stopped unexpectedly)..please help me out to navigate..im new to android..thank u..</p>
