Is that what the method is supposed to return? What about this statement of yours:so i return the area:
And this:inside the loop i will need to check each Ambulance to see if it matches the area and, if it does, increment a counter.
/** * Get the number of ambulances in the given area. * @param area The area of the ambulances. * @return the number of ambulances in the given area. */ public int getNumberOfAmbulances(int area) { }