title: setText error in get Intent from activity
body: <p>I am wondering why this is code is error,</p>
  
  <p>Here's my code:</p>
  
  <pre><code>TextView txt_loggedName = (TextView) findViewById(R.id.tv1);
  
  Intent intent = getIntent();
  
  String name  = intent.getStringExtra("name");
  
  txt_loggedName.setText(name);
  </code></pre>
  
  <p>i am getting error in this line</p>
  
  <pre><code>txt_loggedName.setText(name);
  </code></pre>
  
  <p>!<a href="https://i.stack.imgur.com/6P1o3.png" rel="nofollow noreferrer"> Syntax error on token "name", VariableDeclaratorId expected after 
       this token
      - Syntax error on token(s), misplaced construct(s)</a></p>
  
  <p>Kindly help me with this one,</p>
  
  <p>Thank you!</p>