title: Can I use variables in dot-notation in Java?
body: <p>I am currently programming my first Android app and want to use a for-loop to add items to a View. This is done by Java:</p>
  
  <pre><code>for (int i = 1; i &lt; 27; i++){
                  items.add(new Item("Wallpaper " + i, R.drawable.wallpaper1));
              }
  </code></pre>
  
  <p>Am I able to use the variable "i" inside the "R.drawable.wallpaper_" call? The result should be something like:</p>
  
  <pre><code>items.add(new Item("Wallpaper " + i, R.drawable.wallpaper1));
  items.add(new Item("Wallpaper " + i, R.drawable.wallpaper2));
  items.add(new Item("Wallpaper " + i, R.drawable.wallpaper3));
  </code></pre>
  
  <p>and so on.</p>
  
  <p>Thanks in advance 
  Tafelbomber</p>