title: how to get string value in java
body: <pre><code>String Qty1 = &quot;1&quot;;
  String Qty2 = &quot;2&quot;;
  String  qtyString = &quot;&quot;, bString = &quot;&quot;, cString = &quot;&quot;;
  for(int j = 1; j &lt;= 2; j++)
  {
      qtyString = String.valueOf((&quot;Qty&quot; + j)); 
      System.out.println(&quot;qtyString = &quot; + qtyString);
  }
  </code></pre>
  <p>output:</p>
  <blockquote>
  <p>qtyString = Qty1;</p>
  <p>qtyString = Qty2;</p>
  </blockquote>
  <p>I would like to get qtyString = 1, qtyString = 2; I want to print Qty1 and Qty2 value in my for loop. In C#, this code works correctly. I don't know how to get qtyString value as 1, 2 in java.</p>