How to add a user input number to the end of a string to select a specific object
<p>im struggling with abit of java code.</p>

<p>Currently i have 8 rooms</p>

<pre><code>    room1 = new Room(1,1);
    room2 = new Room(2,1);
    room3 = new Room(3,1);
    room4 = new Room(4,1);
    room5 = new Room(5,2);
    room6 = new Room(6,2);
    room7 = new Room(7,3);
    room8 = new Room(8,3);
</code></pre>

<p>Now i need to make it so that the user inputs a number 1 to 8 regarding the room they require, then the system needs to add that number to the prefix room so that i can call methods of the desired room.</p>

<p>I currently have this code to receive the selection</p>

<pre><code>roomselect = scan.nextInt();
</code></pre>

<p>and then this is where i get stuck as im unsure how to add roomselect integer onto the prefix 'room'</p>

<p>thanks</p>
