 <pre><code>public class Car { private String make; private String model; public Car(String make, String model) { this.make = make; this.model = model; } public void setMake (String str1) { make = str1; } public void setModel (String str2) { model = str2; } public String getMake() { return make; } public String getModel() { return model; } } public class PrintCars { public static void main(String []args) { Car cars[] = new Car[10]; // Assume you populate the array with Car objects here by code cars[0] = new Car("make1", "model1"); for (Car carObj : cars) { System.out.println(carObj.getmake()); System.out.println(carObj.getmodel()); } } } </code></pre>