How can i use @string/xyz in .java file?
<p>I have created a 'hello world' Android project and i want to use my string in <strong>MainActivity.java</strong>.
In <strong>string.xml</strong> file i have a string named <code>password</code></p>

<p>How can i <em>call</em> this string to my <strong>MainActivity.java</strong>?
</p>

<pre><code>&lt;string name="password"&gt;Your password is:&lt;/string&gt;
</code></pre>

<p>a part of <strong>MainActivity.java</strong></p>



<pre><code>    ....
    ....
    //Show password on click
    showBTN.setOnClickListener(new OnClickListener() {

        @Override
        public void onClick(View v) {
        //i want to use a string called from string.xml instead of hard coded
            resTXT.setText("Your password is:"+ pass);
        }
    });

   ....
   ....
</code></pre>
