Returning an object to a method
<p>How can I call call the retriveRoom method and return the rooms[connectedRoom] object, and use the objects properties inside of the method in the ROOMS CLASS? Any help is greatly appreciated. It is saying it cannot find the room.numLights in the system.out.println???</p>

<pre><code> //MASTERCONTROLPANEL CLASS

 public static Object retrieveRoom(int connectedRoom){
    connectedRoom -= 1;
    return rooms[connectedRoom];
    }


 //ROOMS CLASS
 public void roomHeatLoss(){
    //I am having problems with the line below//
    ***Object room***= MasterControlPanel.retrieveRoom(1);
     System.out.println("" + room.numLights);
}
</code></pre>
