SyntaxFix
Write A Post
Hire A Developer
Questions
If you want to use an array, you have to keep a counter which contains the number of cars in the garage. Better use an ArrayList instead of array:
ArrayList
List<Car> garage = new ArrayList<Car>(); garage.add(redCar);