Displaying edittext input on another activity
<p>I am having quite a simple problem.
I want to take an numerical input in an activity then display that on another activity.</p>

<p><strong>input.java</strong></p>

<pre><code>Button ok = (Button) findViewById(R.id.inputok);
ok.setOnClickListener (new OnClickListener ()
{

    public void onClick(View vie)
    {EditText et = (EditText) findViewById(R.id.ei);
    a = Integer.valueOf(et.getText().toString());


        Intent intent= new Intent (input.this, answer.class);
     intent.putExtra("i", a );
    startActivity(intent);
    }
} );      
</code></pre>

<p>Now before displaying it on another i want to perform some action on the integer, say +1 to it.</p>

<p><strong>answer.java</strong></p>

<pre><code> Bundle extras = getIntent().getExtras(); 
int a = extras.getInt("i");
++a;
TextView TV= (TextView) findViewById(R.id.TV);
TV.setText(a);
</code></pre>

<p>When i try to run this, the app closes, is there something wrong with the code??</p>
