basic android application setText() not working : 

<!-- begin snippet: js hide: false console: true babel: false -->

<!-- language: lang-html -->

    package com.example.v_krkoru.androidapp;

    import android.content.Intent;
    import android.os.Bundle;
    import android.support.v7.app.AppCompatActivity;
    import android.view.View;
    import android.widget.EditText;

    public class MainActivity extends AppCompatActivity {

        public static final String EXTRA_MESSAGE = "com.example.androidapp.MESSAGE";

        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_main);
        }

        public void sendMessage(View view)
        {
            Intent intent  = new Intent(this, DisplayMessageActivity.class);
            EditText editText = (EditText) findViewById(R.id.editText);
            String message = editText.getText().toString();
            intent.putExtra(EXTRA_MESSAGE, message);
            startActivity(intent);
        }
    }

    package com.example.v_krkoru.androidapp;

    import android.content.Intent;
    import android.os.Bundle;
    import android.support.v7.app.AppCompatActivity;
    import android.widget.TextView;
    import android.view.ViewGroup;

    public class DisplayMessageActivity extends AppCompatActivity {

        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_display_message);
        }

        Intent intent = getIntent();
        String message = intent.getStringExtra(MainActivity.EXTRA_MESSAGE);

        TextView textView = (TextView) findViewById(R.id.textView);
        textView.setText(message);

    }



<!-- end snippet -->

here i entered two java codes of activities which are interlinked by means of intent what iam trying to do is when i type a message and click on send button The next activity should display the message typed on new screen
Iam learning this from android website and struck here as setText() method is not working