title: hardcode string vs @string in Java code - Android
body: <p>I'm just wondering what the benefits/overheads are for using <code>@string</code> rather than hard coding strings within the actual Java code... For Example:</p>
  
  <pre><code>// To get the string resource:
  getActivity.setTitle(getString(R.string.my_string));
  </code></pre>
  
  <p>Is this the best practice for Things like Actionbar titles, Dynamically created button text, ect... Or should I just do this:</p>
  
  <pre><code>// Hardcoded string
  getActivity.setTitle("My String");
  </code></pre>
  
  <p>I know there will be a bit more overhead doing it the first way.. Just not sure what best practice is.</p>