View Single Post
  #4 (permalink)  
Old 11-21-2007, 08:28 AM
hardwired hardwired is offline
Senior Member
 
Join Date: Jul 2007
Posts: 1,022
hardwired is on a distinguished road
So that the Entrance class could use the Garage reference, viz, "garage" to call the enter method in the Garage class.
Code:
class Entrance extends Thread { Garage garage; public Exit(Garage garage, int threadNum) { this.garage = garage; ... public void run() { for(int j = 0; j < 10; j++) { garage.enter(number, j+1);
Reply With Quote