Most efficient method to use position to open a .java
<p>Sorry for the formating errors - How do you use position once you have it (or another variable for that matter) to activate a file or other task? For example I want to use position 1 to open screen1.java and position 2 to open screen2.java. I could use if/else statements but can I do it in one line rather than many? If I had 100 different screens then an if then statement would be silly. Here is what I have as an (incorrect) example. Can you help me correct it? </p>

<pre><code>public void onItemClick(AdapterView&lt;?&gt; parent, View v,
int position, long id){
//opens relevant game window
Intent intent = new Intent(context, "game"+(position)+"mainscreen"+".class");
startActivity(intent);
} 
});
}
</code></pre>

<p>TO SUMMARIZE:-
<B> instead of using </B> game1mainscreen.class <B> I want to use something like </B> "game"+(position)+"mainscreen"+".class"</p>
