i'm having compilation problems with this piece of code. The problem is with the 'x' in the lines arrayOfCars[x] = tempBuyCar; and System.out.println(arrayOfCars[x]);
i get the error 'cannot resolve symbol'. however if i replace the x with a number it compiles.