title: Please help me debug the error:java.lang.NullPointerException
body: <p>Iam trying to pass a user input value from one activity to another. In the second activity Iam doing some manipulation on the data and displaying the final value. But it is giving a nullpointerexception. </p>
  
  <p>What is the error in my code?</p>
  
  <p>first activity:</p>
  
  <pre><code>protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.fourth);
  
      final EditText et;
      final Button b;
  
      et = (EditText) findViewById(R.id.editText1);
      b = (Button) findViewById(R.id.button1);
  
      b.setOnClickListener(new OnClickListener() {
  
  
          @Override
          public void onClick(View v) 
  {
                 Intent intent = new Intent(Fourth.this, Fifth.class);
                 intent.putExtra("thetext", et.getText().toString());
                 startActivity(intent);
  
              Intent intentnew = new Intent(Fourth.this, Sixth.class);
              intentnew.putExtra("thetext", et.getText().toString());            
              startActivity(intentnew);   
  
  }
  </code></pre>
  
  <p>next activity where the data is received and displayed.(the code snippet)</p>
  
  <pre><code>TextView tvr = (TextView) findViewById(R.id.finalremark);
  
  
  double wto=Double.parseDouble(getIntent().getExtras().getString("the text"));
  
                              double z=wto*0.75;
  
                              String weight= Double.toString(z); 
  
                              tvr.setText(weight);
  </code></pre>
  
  <p>the logcat </p>
  
  <pre><code>09-03 11:11:06.069: E/AndroidRuntime(30262): FATAL EXCEPTION: main
  09-03 11:11:06.069: E/AndroidRuntime(30262): java.lang.NullPointerException
  09-03 11:11:06.069: E/AndroidRuntime(30262):    at    com.example.footforthought.Sixth$2.handleMessage(Sixth.java:380)
  09-03 11:11:06.069: E/AndroidRuntime(30262):    at  android.os.Handler.dispatchMessage(Handler.java:99)
  09-03 11:11:06.069: E/AndroidRuntime(30262):    at android.os.Looper.loop(Looper.java:137)
  09-03 11:11:06.069: E/AndroidRuntime(30262):    at android.app.ActivityThread.main(ActivityThread.java:4517)
  09-03 11:11:06.069: E/AndroidRuntime(30262):    at java.lang.reflect.Method.invokeNative(Native Method)
  09-03 11:11:06.069: E/AndroidRuntime(30262):    at java.lang.reflect.Method.invoke(Method.java:511)
  09-03 11:11:06.069: E/AndroidRuntime(30262):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:993)
  09-03 11:11:06.069: E/AndroidRuntime(30262):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:760)
  09-03 11:11:06.069: E/AndroidRuntime(30262):    at dalvik.system.NativeStart.main(Native Method)
  09-03 11:11:17.969: I/Process(30262): Sending signal. PID: 30262 SIG: 9
  </code></pre>