Here is my code.
In the MainActivity.java, I called this method.
public void doViewRecord(View v){
    startActivity(new Intent(this, ActivityView.class));
}
And in the SecondActivity (ActivityView.java).
[This is where I get my error]
tv_id = findViewById(R.id.tvId);
    tv_name = findViewById(R.id.tvName);
    tv_course = findViewById(R.id.tvCourse);
    try{
        extra = getIntent().getExtras();
        id = extra.getString("id");
        tv_id.setText(id);
    }catch (Exception e){
        e.printStackTrace();
        displayError(e.getMessage());
    }
The error I get is this.

I already tried the intent then bundle, but still it gives me an error.
 
    