title: How to replace a null value with a string with an EditText?
body: <p>I have this app with an EditText and when you click a button it sends the value to the second screen/activity. There is a hint in the EditText upon opening the app, but does that  count as not a null value? I currently have an if statement but it isn't working to replace the null value with "friend". 
  How can i change the code to display "friend" when nothing is typed into the EditText?   </p>
  
  <pre><code>public class SecondActivity extends Activity {
  
  public static final String TAG = SecondActivity.class.getSimpleName();
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.secondscreen);
  
      Intent intent = getIntent();
      String message = intent.getStringExtra("message");
      if (message == null) {
          message = "Friend";
      }
      Log.d(TAG, message);
  
  
      TextView textView = (TextView) findViewById(R.id.button);
      textView.append(message);
  
  
  }
  
  @Override
  public boolean onCreateOptionsMenu(Menu menu) {
      // Inflate the menu; this adds items to the action bar if it is present.
      getMenuInflater().inflate(R.menu.menu_second, menu);
      return true;
  }
  
  @Override
  public boolean onOptionsItemSelected(MenuItem item) {
      // Handle action bar item clicks here. The action bar will
      // automatically handle clicks on the Home/Up button, so long
      // as you specify a parent activity in AndroidManifest.xml.
      int id = item.getItemId();
  
      //noinspection SimplifiableIfStatement
      if (id == R.id.action_settings) {
          return true;
      }
  
      return super.onOptionsItemSelected(item);
  }
  </code></pre>
  
  <p>}</p>