Is it possible to use a variable by providing its name through reflection?
<p>I'm trying to get access to some string resources generated in R.java class at runtime.</p>

<p>R.java :</p>

<pre><code>  public static final class string {
   public static final int app_name=0x7f040000;
    public static final int eightOvereight=0x7f040030;
    public static final int eightOvernine=0x7f040031;
    public static final int fiveOvereight=0x7f040027;
    public static final int fiveOverfive=0x7f040024;
    public static final int fiveOvernine=0x7f040028;
    public static final int fiveOverseven=0x7f040026;
    public static final int fiveOversix=0x7f040025;
    public static final int fourOvereight=0x7f040022;
    public static final int fourOverfive=0x7f04001f;
    {
</code></pre>

<p>At runtime I have:</p>

<pre><code>     String current = getStringId(); // assume current = "eightOvereight" after this line

     //now I would like to use R.string.eightOvereight. I don't want to use a switch statement.
</code></pre>

<p>Can I achieve this through reflection?</p>
